Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#2816 closed defect (worksforme)

configure --libdir doesn't seem to be working

Reported by: alsocurious Owned by:
Priority: normal Component: build system
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

What you were trying to accomplish:
Build ffmpeg for install of everything in directory under home directory

The problem you encountered:
ffmpeg libraries are installed to /usr/lib no matter which configure --prefix or --libdir is specified or not.

The exact command line you were using:
$ git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg

./configure --prefix=/home/test/local --bindir=/home/test/local/bin --datadir=/home/test/local/share/ffmpeg --incdir=/home/test/local/include/ffmpeg --libdir=/home/test/local/lib --mandir=/home/test/local/share/man --arch=i686 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -grecord-gcc-switches -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables' --enable-bzlib --disable-crystalhd --enable-frei0r --enable-gnutls --enable-libass --enable-libcelt --enable-libdc1394 --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopencv --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib --cpu=i686 --enable-runtime-cpudetect

The above is the same as listed by running ffmpeg from ffmpeg-1.2.1-3.fc19.i686 for Fedora 19 but with "/usr" replaced by "/home/test/local"

$ make

$ make install
INSTALL libavdevice/libavdevice.so
install: cannot create regular file ‘/usr/lib/libavdevice.so.55.3.100’: Permission denied
make: * [install-libavdevice-shared] Error 1

The above "make install" would have worked without becoming superuser if install had been to the home directory as specified in the configure command.

Change History (7)

comment:1 by Carl Eugen Hoyos, 11 years ago

Component: undeterminedbuild system
Resolution: worksforme
Status: newclosed

You are searching for the following configure option:

  --shlibdir=DIR           install shared libs in DIR [PREFIX/lib]

in reply to:  1 comment:2 by Carl Eugen Hoyos, 11 years ago

Replying to cehoyos:

  --shlibdir=DIR           install shared libs in DIR [PREFIX/lib]

I guess it could be argued that this should default to libdir instead of [PREFIX/lib] but that would change behaviour (for a very unusual configure line) so I will not work on this.

comment:3 by alsocurious, 11 years ago

Thanks.
I already tried --shlibdir but to be sure I tried all 3 combinations in turn
--libdir
--shlibdir
--libdir --shlibdir
and the result for all is the same as I reported - that "make install" installs to /usr/lib as if --libdir and --shlibdir are ignored.
If that's indeed the case then perhaps the "configure --help" should be updated to reflect that?
I'll get by without doing the "make install" by setting LD_LIBRARY_PATH to point to the libs in the build dir - which is perhaps what I'd have to do anyway even if --libdir worked.

comment:4 by Carl Eugen Hoyos, 11 years ago

You used --shlibdir=/usr/lib in your configure line so shared libraries are installed in /usr/lib or do I miss something?

comment:5 by alsocurious, 11 years ago

Thanks.
You're right.
The configure options that I used were a copy of those listed from running ffmpeg from ffmpeg-1.2.1-3.fc19.i686 on Fedora 19 with only the install location options modified and I did not think to check for more install location options beyond the last one of those listed in the beginning and therefore missed that singly stated shlibdir option towards the end in the list.
I retested various combinations of the install location options after removing that trailing shlibdir option and they work as expected.
Sorry - my mistake.

comment:6 by Carl Eugen Hoyos, 11 years ago

Note that apart from --enable-gpl you should only copy the options that you need, some of them look bad.

comment:7 by alsocurious, 11 years ago

Thanks.
All I basically wanted was ffmpeg as bundled by Fedora 19 for the same behavior since I run stock Fedora 19 but with fdk_aac and libfaac enabled. But since I had to do a custom build for that then I might as well get the lastest version of ffmpeg. But with that I learned that I had to change the install locations because otherwise vlc as downloaded from rpmfusion would crash due to no longer finding some ffmpeg libs routine whose name I forget.

Note: See TracTickets for help on using tickets.