Opened 5 years ago

Closed 5 years ago

Last modified 5 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


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:// 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/
install: cannot create regular file ‘/usr/lib/’: 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 follow-up: Changed 5 years ago by cehoyos

  • Component changed from undetermined to build system
  • Resolution set to worksforme
  • Status changed from new to closed

You are searching for the following configure option:

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

comment:2 in reply to: ↑ 1 Changed 5 years ago by cehoyos

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 Changed 5 years ago by alsocurious

I already tried --shlibdir but to be sure I tried all 3 combinations in turn
--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 Changed 5 years ago by cehoyos

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

comment:5 Changed 5 years ago by alsocurious

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 Changed 5 years ago by cehoyos

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

comment:7 Changed 5 years ago by alsocurious

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.