Closed Cqoicebordel closed 1 year ago
I think waf expects CFLAGS as environment variables when invoking was configure.
Ah, maybe. I tested only in front of the "./rebuild -j4" command.
No. Doesn't work. Added export CFLAGS="-I/usr/local/cuda/include -L/usr/local/cuda/lib64";
in front of waf configure in scripts/mpv-configure, same error message at linking time.
Any -L...
flags will need to be in LDFLAGS
or they won't have any effect.
Thanks ! That worked !
I added export CFLAGS="-I/usr/local/cuda/include";export LDFLAGS="-L/usr/local/cuda/lib64";
before the waf configure, and it worked ! Tried also higher, in ./build, before script/mpv-config
worked there also !
Having a way to do this without touching any of the scripts would be ideal though :)
In any case, thanks again !
Old but you could use meson's arguments (c_args
, c_link_args
, etc.) if you prefer those over the environment variables.
I'm sure there is an easy solution to my problem, but didn't succeed to finding it, so here I am.
I tried to build ffmpeg with
--enable-libnpp
, to take advantage of HWA, and everything went fine. I already had--extra-cflags=-I/usr/local/cuda/include
and--extra-ldflags=-L/usr/local/cuda/lib64
to take care of CUDA/NVENC/CUVID. So ffmpeg built without any issue.So, here come the mpv part (for the record, I have
--enable-dvdnav --enable-cdda --enable-dvbin --disable-libarchive
for mpv). The configure goes fine. The compile too. And, you see it coming, I'm sure, there is an issue during the linking.I tried to add the same
--extra-cflags
and--extra-ldflags
as for ffmpeg => error I tried adding --libdir => error I tried fucking with waf, but didn't succeed.Finally, I just executed
scripts/mpv-build -v
, took the array displayed, s/', '/ / it, added the -L ldflag at the right spot, and the linking with cc worked.So, my questions/features requests are :
Thanks ! :)