Opened 11 years ago

Closed 10 years ago

#2807 closed defect (worksforme)

libopenjpeg v1.5.1 library discovery failed

Reported by: Mikhail Fludkov Owned by:
Priority: normal Component: build system
Version: 2.0 Keywords: libopenjpeg
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

I want to cross compile ffmpeg 2.0 with support of libopenjpeg under 64bit Debian 7.1. But configure script ends with ERROR: libopenjpeg not found
Configure command line parameters:

./configure \
--disable-static \
--enable-shared \
--pkg-config=pkg-config \
--enable-runtime-cpudetect \
--arch=x86 \
--target-os=mingw32 \
--enable-cross-compile \
--enable-w32threads \
--enable-memalign-hack \
--cross-prefix=i686-w64-mingw32- \
--enable-libopenjpeg \
--extra-cflags="-I/home/mybestfriend/openjpeg-1.5.1/libopenjpeg" \
--extra-ldflags="-L/home/mybestfriend/openjpeg-1.5.1/libopenjpeg/.libs"

/home/mybestfriend/openjpeg-1.5.1 Folder contains openjpeg library v1.5.1 *.c and *.h files downloaded it from https://code.google.com/p/openjpeg/downloads/detail?name=openjpeg-1.5.1.tar.gz&can=2&q=

/home/mybestfriend/openjpeg-1.5.1/libopenjpeg/.libs Folder contains cross compiled libopenjpeg.a library using the following configure commandline parameters:

./configure \
--host=i686-w64-mingw32 \
--enable-mj2 \
--enable-jpwl \
--enable-jpip 

I have also noticed the compilation error in config.log undefined reference to '_opj_version'. But libopenjpeg.a have this function:

i686-w64-mingw32-nm libopenjpeg.a | grep opj_ver
00000010 T _opj_version@0

I tried libopenjpeg v1.5.0, but it didn't helped.

Attachments (1)

config.log (215.0 KB ) - added by Mikhail Fludkov 11 years ago.
configure log file 'config.log'

Download all attachments as: .zip

Change History (2)

by Mikhail Fludkov, 11 years ago

Attachment: config.log added

configure log file 'config.log'

comment:1 by Carl Eugen Hoyos, 10 years ago

Resolution: worksforme
Status: newclosed

The error is:

i686-w64-mingw32-gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -U__STRICT_ANSI__ -I/home/mybestfriend/openjpeg-1.5.1/libopenjpeg -std=c99 -include ./compat/msvcrt/snprintf.h -fomit-frame-pointer -c -o /tmp/ffconf.19XcSWiA.o /tmp/ffconf.5cH5dlGQ.c
i686-w64-mingw32-gcc -L/home/mybestfriend/openjpeg-1.5.1/libopenjpeg/.libs -Wl,--nxcompat -Wl,--dynamicbase -Wl,--as-needed -o /tmp/ffconf.q7296gAS.exe /tmp/ffconf.19XcSWiA.o -lopenjpeg -lm -lpsapi -ladvapi32 -lshell32
/tmp/ffconf.19XcSWiA.o:ffconf.5cH5dlGQ.c:(.text+0xc): undefined reference to `_opj_version'

I often use a similar configure line and I can confirm that openjpeg-1.5.1 does contain this symbol here:

$ nm ../openjpeg-1.5.1/libopenjpeg/.libs/libopenjpeg.so.1.5.0 |grep opj_version
00000000000118c0 T opj_version
$ nm ../openjpeg-1.5.1/libopenjpeg/.libs/libopenjpeg.a |grep opj_version
0000000000000000 T opj_version

Either your library was miscompiled or your toolchain has a problem afaict.

Note: See TracTickets for help on using tickets.