Compiling error
Justin JEONG
utjustinjeong at yahoo.com
Fri May 29 11:19:31 EDT 2015
Thank you for the tips.
I have updated command based on your suggestion as following:
./configure --enable-dependency-tracking --prefix=/home/justin/local/bin/openslide PKG_CONFIG_PATH=/home/justin/local/bin/openjpeg-2.1.0-Linux-i386/lib/pkgconfig:/home/justin/local/bin/tiff/lib/pkgconfig OPENJPEG2_LIBS=-L/home/justin/local/bin/openjpeg-2.1.0-Linux-i386/lib
The reason for adding OPENJPEG2_LIBS is without this flag it shows following error messages.
...
CCLD src/libopenslide.la
/usr/bin/ld: skipping incompatible /home/justin/local/bin/openjpeg-2.1.0-Linux-i386/lib/libopenjp2.so when searching for -lopenjp2
/usr/bin/ld: cannot find -lopenjp2
collect2: ld returned 1 exit status
make[1]: *** [src/libopenslide.la] Error 1
...
So I looked at the details of error using ld –lopenjp2 --verbose, and it displayed followings:
attempt to open /usr/x86_64-linux-gnu/lib64/libopenjp2.so failed
attempt to open /usr/x86_64-linux-gnu/lib64/libopenjp2.a failed
attempt to open /usr/local/lib64/libopenjp2.so failed
attempt to open /usr/local/lib64/libopenjp2.a failed
attempt to open /lib64/libopenjp2.so failed
attempt to open /lib64/libopenjp2.a failed
attempt to open /usr/lib64/libopenjp2.so failed
attempt to open /usr/lib64/libopenjp2.a failed
attempt to open /usr/x86_64-linux-gnu/lib/libopenjp2.so failed
attempt to open /usr/x86_64-linux-gnu/lib/libopenjp2.a failed
attempt to open /usr/local/lib/libopenjp2.so failed
attempt to open /usr/local/lib/libopenjp2.a failed
attempt to open /lib/libopenjp2.so failed
attempt to open /lib/libopenjp2.a failed
attempt to open /usr/lib/libopenjp2.so failed
attempt to open /usr/lib/libopenjp2.a failed
ld: cannot find -lopenjp2
I found 'libopenjp2.so' is under /home/justin/local/bin/openjpeg-2.1.0-Linux-i386/lib, so I added it.
However, when I do make followed by the command
./configure --enable-dependency-tracking --prefix=/home/justin/local/bin/openslide PKG_CONFIG_PATH=/home/justin/local/bin/openjpeg-2.1.0-Linux-i386/lib/pkgconfig:/home/justin/local/bin/tiff/lib/pkgconfig OPENJPEG2_LIBS=-L/home/justin/local/bin/openjpeg-2.1.0-Linux-i386/lib
I have got following erros
CC src/src_libopenslide_la-openslide-vendor-ventana.lo
CCLD src/libopenslide.la
CC tools/tools_openslide_show_properties-openslide-tools-common.o
CC tools/tools_openslide_show_properties-openslide-show-properties.o
CCLD tools/openslide-show-properties
src/.libs/libopenslide.so: undefined reference to `opj_setup_decoder'
src/.libs/libopenslide.so: undefined reference to `opj_stream_create'
src/.libs/libopenslide.so: undefined reference to `opj_set_default_decoder_parameters'
src/.libs/libopenslide.so: undefined reference to `opj_destroy_codec'
src/.libs/libopenslide.so: undefined reference to `opj_set_error_handler'
src/.libs/libopenslide.so: undefined reference to `opj_create_decompress'
src/.libs/libopenslide.so: undefined reference to `opj_stream_destroy'
src/.libs/libopenslide.so: undefined reference to `opj_stream_set_read_function'
src/.libs/libopenslide.so: undefined reference to `opj_decode'
src/.libs/libopenslide.so: undefined reference to `opj_stream_set_user_data_length'
src/.libs/libopenslide.so: undefined reference to `opj_stream_set_user_data'
src/.libs/libopenslide.so: undefined reference to `opj_image_destroy'
src/.libs/libopenslide.so: undefined reference to `opj_set_warning_handler'
src/.libs/libopenslide.so: undefined reference to `opj_read_header'
collect2: ld returned 1 exit status
make[1]: *** [tools/openslide-show-properties] Error 1
It is same error that I have got before.
So, I run 'make --debug=v' then I have got following details.
..... omitted .....
Pruning file `src/openslide-features.h'.
Pruning file `/usr/lib/gcc/x86_64-linux-gnu/4.4.5/include/stdbool.h'.
Pruning file `/usr/include/stdint.h'.
Pruning file `/usr/include/bits/wchar.h'.
Considering target file `tools/openslide-tools-common.h'.
Finished prerequisites of target file `tools/openslide-tools-common.h'.
No commands for `tools/openslide-tools-common.h' and no prerequisites actually changed.
No need to remake target `tools/openslide-tools-common.h'.
Pruning file `config.h'.
Finished prerequisites of target file `tools/tools_openslide_show_properties-openslide-tools-common.o'.
Must remake target `tools/tools_openslide_show_properties-openslide-tools-common.o'.
CC tools/tools_openslide_show_properties-openslide-tools-common.o
Successfully remade target file `tools/tools_openslide_show_properties-openslide-tools-common.o'.
Considering target file `tools/tools_openslide_show_properties-openslide-show-properties.o'.
File `tools/tools_openslide_show_properties-openslide-show-properties.o' does not exist.
Considering target file `tools/openslide-show-properties.c'.
Finished prerequisites of target file `tools/openslide-show-properties.c'.
No need to remake target `tools/openslide-show-properties.c'.
Pruning file `tools/.dirstamp'.
Pruning file `tools/.deps/.dirstamp'.
..... omitted .....
Pruning file `src/openslide.h'.
Pruning file `src/openslide-features.h'.
Pruning file `/usr/lib/gcc/x86_64-linux-gnu/4.4.5/include/stdbool.h'.
Pruning file `/usr/include/stdint.h'.
Pruning file `/usr/include/bits/wchar.h'.
Pruning file `tools/openslide-tools-common.h'.
Finished prerequisites of target file `tools/tools_openslide_show_properties-openslide-show-properties.o'.
Must remake target `tools/tools_openslide_show_properties-openslide-show-properties.o'.
CC tools/tools_openslide_show_properties-openslide-show-properties.o
Successfully remade target file `tools/tools_openslide_show_properties-openslide-show-properties.o'.
Pruning file `src/libopenslide.la'.
Pruning file `tools/.dirstamp'.
Finished prerequisites of target file `tools/openslide-show-properties'.
Must remake target `tools/openslide-show-properties'.
CCLD tools/openslide-show-properties
src/.libs/libopenslide.so: undefined reference to `opj_setup_decoder'
src/.libs/libopenslide.so: undefined reference to `opj_stream_create'
src/.libs/libopenslide.so: undefined reference to `opj_set_default_decoder_parameters'
src/.libs/libopenslide.so: undefined reference to `opj_destroy_codec'
src/.libs/libopenslide.so: undefined reference to `opj_set_error_handler'
src/.libs/libopenslide.so: undefined reference to `opj_create_decompress'
src/.libs/libopenslide.so: undefined reference to `opj_stream_destroy'
src/.libs/libopenslide.so: undefined reference to `opj_stream_set_read_function'
src/.libs/libopenslide.so: undefined reference to `opj_decode'
src/.libs/libopenslide.so: undefined reference to `opj_stream_set_user_data_length'
src/.libs/libopenslide.so: undefined reference to `opj_stream_set_user_data'
src/.libs/libopenslide.so: undefined reference to `opj_image_destroy'
src/.libs/libopenslide.so: undefined reference to `opj_set_warning_handler'
src/.libs/libopenslide.so: undefined reference to `opj_read_header'
collect2: ld returned 1 exit status
make[1]: *** [tools/openslide-show-properties] Error 1
make[1]: Leaving directory `/home/justin/local/tools/slideAtlas/openslide-3.4.1'
make: *** [all] Error 2
Can you figure out why it happens?
I will appreciate any suggestions.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.andrew.cmu.edu/pipermail/openslide-users/attachments/20150529/cbbf6b98/attachment.html
More information about the openslide-users
mailing list