binarycrusader / libproxy

Automatically exported from code.google.com/p/libproxy
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Problems linking -lmozjs #114

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Build with mozjs but not webkit

What is the expected output? What do you see instead?
It should build, it fails

What version of the product are you using? On what operating system?
Version 0.4.1 (on Gentoo)

Please provide any additional information below.

With Perl enabled I get:
 * CPV:  net-libs/libproxy-0.4.1
 * REPO: gentoo
 * USE:  amd64 elibc_glibc kernel_linux multilib perl python
userland_GNU xulrunner
>>> Unpacking source...
>>> Unpacking libproxy-0.4.1.tar.gz to
/var/tmp/portage/net-libs/libproxy-0.4.1/work
>>> Source unpacked in /var/tmp/portage/net-libs/libproxy-0.4.1/work
>>> Preparing source in
/var/tmp/portage/net-libs/libproxy-0.4.1/work/libproxy-0.4.1 ...
>>> Source prepared.
>>> Configuring source in
/var/tmp/portage/net-libs/libproxy-0.4.1/work/libproxy-0.4.1 ...
>>> Working in BUILD_DIR:
"/var/tmp/portage/net-libs/libproxy-0.4.1/work/libproxy-0.4.1_build"
cmake -C
/var/tmp/portage/net-libs/libproxy-0.4.1/temp/gentoo_common_config.cmake
-DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_CXX_FLAGS=-march=core2 -msse4.1 -O2
-pipe -DCMAKE_LD_FLAGS=-march=core2 -msse4.1 -O2 -pipe -DWITH_GNOME=OFF
-DWITH_KDE4=OFF -DWITH_NM=OFF -DWITH_PERL=ON -DWITH_PYTHON=ON
-DWITH_VALA=OFF -DWITH_WEBKIT=OFF -DWITH_MOZJS=ON -DCMAKE_BUILD_TYPE=Gentoo
-DCMAKE_INSTALL_DO_STRIP=OFF
-DCMAKE_USER_MAKE_RULES_OVERRIDE=/var/tmp/portage/net-libs/libproxy-0.4.1/temp/g
entoo_rules.cmake
 /var/tmp/portage/net-libs/libproxy-0.4.1/work/libproxy-0.4.1
loading initial cache file
/var/tmp/portage/net-libs/libproxy-0.4.1/temp/gentoo_common_config.cmake
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/x86_64-pc-linux-gnu-gcc
-- Check for working C compiler: /usr/bin/x86_64-pc-linux-gnu-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/x86_64-pc-linux-gnu-g++
-- Check for working CXX compiler: /usr/bin/x86_64-pc-linux-gnu-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- checking for module 'xulrunner-js'
--   package 'xulrunner-js' not found
-- checking for module 'firefox-js'
--   package 'firefox-js' not found
-- checking for module 'mozilla-js'
--   found mozilla-js, version 1.9.2.3
MODULES TO BUILD:
    *   config_envvar
        config_gnome
        config_kde4
        config_macosx
        config_w32reg
    *   ignore_domain
    *   ignore_hostname
    *   ignore_ip
        network_networkmanager
    *   pacrunner_mozjs
        pacrunner_webkit
    *   wpad_dns_alias

-- Found PythonInterp: /usr/bin/python
-- Found Perl: /usr/bin/perl
-- Found PerlLibs: /usr/lib64/libperl.so
-- <<< Gentoo configuration >>>
Build type      Gentoo
Install path    /usr
Compiler flags:
C               -march=core2 -msse4.1 -O2 -pipe
-Wimplicit-function-declaration 
C++              -fvisibility=hidden -Os -march=core2 -msse4.1 -O2 -pipe 
Linker flags:
Executable      -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu
Module          -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu
Shared          -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu

-- Configuring done
-- Generating done
-- Build files have been written to:
/var/tmp/portage/net-libs/libproxy-0.4.1/work/libproxy-0.4.1_build
>>> Source configured.
>>> Compiling source in
/var/tmp/portage/net-libs/libproxy-0.4.1/work/libproxy-0.4.1 ...
>>> Working in BUILD_DIR:
"/var/tmp/portage/net-libs/libproxy-0.4.1/work/libproxy-0.4.1_build"
make -j9 
Scanning dependencies of target libmodman
Scanning dependencies of target PMlibproxy
[  3%] Building CXX object
libmodman/CMakeFiles/libmodman.dir/module_manager.cpp.o
[  3%] Built target PMlibproxy
Linking CXX shared library libmodman.so
[  3%] Built target libmodman
Scanning dependencies of target builtin
Scanning dependencies of target condition
Scanning dependencies of target builtin_one
Scanning dependencies of target condition_one
Scanning dependencies of target condition_two
Scanning dependencies of target singleton
Scanning dependencies of target singleton_two
Scanning dependencies of target sorted
Scanning dependencies of target singleton_one
[  6%] [  9%] [ 12%] [ 16%] Building CXX object
libmodman/CMakeFiles/condition.dir/test/main.cpp.o
[ 19%] Building CXX object
libmodman/CMakeFiles/builtin_one.dir/libmodman/test/builtin_one.cpp.o
[ 22%] Building CXX object
libmodman/CMakeFiles/builtin.dir/test/builtin.cpp.o
[ 25%] [ 29%] Building CXX object
libmodman/CMakeFiles/singleton.dir/test/main.cpp.o
Building CXX object
libmodman/CMakeFiles/condition_two.dir/libmodman/test/condition_two.cpp.o
Building CXX object libmodman/CMakeFiles/sorted.dir/test/main.cpp.o
Building CXX object
libmodman/CMakeFiles/condition_one.dir/libmodman/test/condition_one.cpp.o
[ 32%] Building CXX object
libmodman/CMakeFiles/singleton_one.dir/libmodman/test/singleton_one.cpp.o
Building CXX object
libmodman/CMakeFiles/singleton_two.dir/libmodman/test/singleton_two.cpp.o
Linking CXX shared module test/modules/condition/condition_two.so
Linking CXX shared module test/modules/builtin/builtin_one.so
Linking CXX shared module test/modules/singleton/singleton_one.so
Linking CXX shared module test/modules/singleton/singleton_two.so
Linking CXX shared module test/modules/condition/condition_one.so
[ 32%] Built target condition_two
[ 32%] Built target singleton_two
Scanning dependencies of target sorted_one
[ 32%] Built target singleton_one
Scanning dependencies of target sorted_two
Scanning dependencies of target symbol
[ 35%] [ 35%] [ 38%] Building CXX object
libmodman/CMakeFiles/sorted_one.dir/libmodman/test/sorted_one.cpp.o
[ 41%] Built target condition_one
Building CXX object
libmodman/CMakeFiles/sorted_two.dir/libmodman/test/sorted_two.cpp.o
[ 41%] Building CXX object
libmodman/CMakeFiles/symbol.dir/test/main.cpp.o
Built target builtin_one
Scanning dependencies of target symbol_one
Scanning dependencies of target symbol_two
[ 45%] Building CXX object
libmodman/CMakeFiles/symbol_one.dir/libmodman/test/symbol_one.cpp.o
[ 48%] [ 51%] Building CXX object
libmodman/CMakeFiles/builtin.dir/libmodman/test/builtin_one.cpp.o
Building CXX object
libmodman/CMakeFiles/symbol_two.dir/libmodman/test/symbol_two.cpp.o
Linking CXX executable builtin
Linking CXX shared module test/modules/symbol/symbol_one.so
Linking CXX shared module test/modules/symbol/symbol_two.so
Linking CXX shared module test/modules/sorted/sorted_one.so
Linking CXX executable condition
[ 51%] Built target builtin
Linking CXX executable sorted
Scanning dependencies of target symbollnk
[ 54%] Building CXX object
libmodman/CMakeFiles/symbollnk.dir/test/main.cpp.o
Linking CXX shared module test/modules/sorted/sorted_two.so
[ 54%] Built target symbol_one
Scanning dependencies of target libproxy
[ 54%] Built target symbol_two
[ 54%] Built target sorted_one
[ 54%] Built target condition
[ 54%] Built target sorted
Linking CXX executable singleton
[ 54%] [ 58%] Built target sorted_two
[ 61%] Building CXX object
libproxy/CMakeFiles/libproxy.dir/extension_config.cpp.o
Building CXX object
libproxy/CMakeFiles/libproxy.dir/extension_pacrunner.cpp.o
[ 64%] Building CXX object
libproxy/CMakeFiles/libproxy.dir/extension_wpad.cpp.o
[ 67%] [ 70%] Building CXX object
libproxy/CMakeFiles/libproxy.dir/proxy.cpp.o
[ 74%] Building CXX object libproxy/CMakeFiles/libproxy.dir/url.cpp.o
Building CXX object
libproxy/CMakeFiles/libproxy.dir/modules/config_envvar.cpp.o
[ 74%] Built target singleton
[ 77%] Building CXX object
libproxy/CMakeFiles/libproxy.dir/modules/ignore_domain.cpp.o
Linking CXX executable symbol
[ 80%] Building CXX object
libproxy/CMakeFiles/libproxy.dir/modules/ignore_hostname.cpp.o
[ 83%] Building CXX object
libproxy/CMakeFiles/libproxy.dir/modules/ignore_ip.cpp.o
[ 87%] Building CXX object
libproxy/CMakeFiles/libproxy.dir/modules/pacrunner_mozjs.cpp.o
[ 87%] Built target symbol
[ 90%] Building CXX object
libproxy/CMakeFiles/libproxy.dir/modules/wpad_dns_alias.cpp.o
Linking CXX executable symbollnk
[ 90%] Built target symbollnk
Linking CXX shared library libproxy.so
[ 90%] Built target libproxy
[ 93%] Generating
/var/tmp/portage/net-libs/libproxy-0.4.1/work/libproxy-0.4.1/bindings/perl/src/L
ibproxy.c
Scanning dependencies of target proxy
[ 96%] Building C object utils/CMakeFiles/proxy.dir/proxy.c.o
Linking C executable proxy
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/../../../../x86_64-pc-linux-gnu/bin/l
d:
cannot find -lmozjs
collect2: ld returned 1 exit status
make[2]: *** [utils/proxy] Error 1
make[1]: *** [utils/CMakeFiles/proxy.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Scanning dependencies of target PLlibproxy
[100%] Building C object
bindings/perl/src/CMakeFiles/PLlibproxy.dir/Libproxy.c.o
cc1plus: warning: command line option "-Wimplicit-function-declaration"
is valid for C/ObjC but not for C++
Linking C shared library ../../../perl/blib/arch/auto/Net/Libproxy.so
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/../../../../x86_64-pc-linux-gnu/bin/l
d:
cannot find -lmozjs
collect2: ld returned 1 exit status
make[2]: *** [perl/blib/arch/auto/Net/Libproxy.so] Error 1
make[1]: *** [bindings/perl/src/CMakeFiles/PLlibproxy.dir/all] Error 2
make: *** [all] Error 2
 * ERROR: net-libs/libproxy-0.4.1 failed:
 *   Make failed!
 * 
 * Call stack:
 *     ebuild.sh, line   48:  Called src_compile
 *   environment, line 4926:  Called cmake-utils_src_compile
 *   environment, line 1204:  Called _execute_optionaly
'src_compile'
 *   environment, line  357:  Called enable_cmake-utils_src_compile
 *   environment, line 1563:  Called cmake-utils_src_make
 *   environment, line 1223:  Called die
 * The specific snippet of code:
 *           emake "$@" || die "Make failed!";
 * 
 * If you need support, post the output of 'emerge --info
=net-libs/libproxy-0.4.1',
 * the complete build log and the output of 'emerge -pqv
=net-libs/libproxy-0.4.1'.
 * The complete build log is located at
'/home/ssuominen/logs/net-libs:libproxy-0.4.1:20100518-170152.log'.
 * The ebuild environment file is located at
'/var/tmp/portage/net-libs/libproxy-0.4.1/temp/environment'.
 * S:
'/var/tmp/portage/net-libs/libproxy-0.4.1/work/libproxy-0.4.1'

Without perl I get:

cmake -C
/var/tmp/portage/net-libs/libproxy-0.4.1/temp/gentoo_common_config.cmake
-DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_CXX_FLAGS=-O2 -pipe -ggdb -march=core2
-DCMAKE_LD_FLAGS=-O2 -pipe -ggdb -march=core2 -DWITH_PERL=off
-DWITH_GNOME=ON -DWITH_KDE4=OFF -DWITH_NM=OFF -DWITH_PYTHON=ON
-DWITH_VALA=ON -DWITH_WEBKIT=OFF -DWITH_MOZJS=ON -DCMAKE_BUILD_TYPE=Gentoo
-DCMAKE_INSTALL_DO_STRIP=OFF
-DCMAKE_USER_MAKE_RULES_OVERRIDE=/var/tmp/portage/net-libs/libproxy-0.4.1/temp/g
entoo_rules.cmake
 /var/tmp/portage/net-libs/libproxy-0.4.1/work/libproxy-0.4.1
loading initial cache file
/var/tmp/portage/net-libs/libproxy-0.4.1/temp/gentoo_common_config.cmake
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/x86_64-pc-linux-gnu-gcc
-- Check for working C compiler: /usr/bin/x86_64-pc-linux-gnu-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/x86_64-pc-linux-gnu-g++
-- Check for working CXX compiler: /usr/bin/x86_64-pc-linux-gnu-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- checking for module 'xulrunner-js'
--   package 'xulrunner-js' not found
-- checking for module 'firefox-js'
--   package 'firefox-js' not found
-- checking for module 'mozilla-js'
--   found mozilla-js, version 1.9.2.3
-- checking for modules 'gconf-2.0;gobject-2.0'
--   found gconf-2.0, version 2.28.1
--   found gobject-2.0, version 2.22.5
MODULES TO BUILD:
    *   config_envvar
    m   config_gnome
        config_kde4
        config_macosx
        config_w32reg
    *   ignore_domain
    *   ignore_hostname
    *   ignore_ip
        network_networkmanager
    *   pacrunner_mozjs
        pacrunner_webkit
    *   wpad_dns_alias

-- Found PythonInterp: /usr/bin/python
-- <<< Gentoo configuration >>>
Build type      Gentoo
Install path    /usr
Compiler flags:
C               -O2 -pipe -ggdb -march=core2 
C++              -fvisibility=hidden -Os -O2 -pipe -ggdb -march=core2 
Linker flags:
Executable      -Wl,-O1
Module          -Wl,-O1
Shared          -Wl,-O1

-- Configuring done
-- Generating done
-- Build files have been written to:
/var/tmp/portage/net-libs/libproxy-0.4.1/work/libproxy-0.4.1_build
>>> Source configured.
shell-init: error retrieving current directory: getcwd: cannot access
parent directories: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access
parent directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent
directories: No such file or directory
>>> Compiling source in
/var/tmp/portage/net-libs/libproxy-0.4.1/work/libproxy-0.4.1 ...
>>> Working in BUILD_DIR:
"/var/tmp/portage/net-libs/libproxy-0.4.1/work/libproxy-0.4.1_build"
make -j3 
Scanning dependencies of target libmodman
Scanning dependencies of target pxgconf
[  3%] Building CXX object
libmodman/CMakeFiles/libmodman.dir/module_manager.cpp.o
[  6%] Building CXX object
libproxy/CMakeFiles/pxgconf.dir/modules/pxgconf.cpp.o
Linking CXX executable pxgconf
[  6%] Built target pxgconf
Linking CXX shared library libmodman.so
[  6%] Built target libmodman
Scanning dependencies of target builtin_one
Scanning dependencies of target builtin
[  9%] Building CXX object libmodman/CMakeFiles/builtin.dir/test/builtin.cpp.o
Scanning dependencies of target condition
[ 16%] [ 16%] Building CXX object
libmodman/CMakeFiles/builtin_one.dir/libmodman/test/builtin_one.cpp.o
Building CXX object libmodman/CMakeFiles/condition.dir/test/main.cpp.o
[ 19%] Building CXX object
libmodman/CMakeFiles/builtin.dir/libmodman/test/builtin_one.cpp.o
Linking CXX shared module test/modules/builtin/builtin_one.so
[ 19%] Linking CXX executable builtin
Built target builtin_one
Scanning dependencies of target condition_one
[ 22%] Building CXX object
libmodman/CMakeFiles/condition_one.dir/libmodman/test/condition_one.cpp.o
[ 22%] Built target builtin
Linking CXX executable condition
[ 22%] Built target condition
Scanning dependencies of target condition_two
[ 25%] Building CXX object
libmodman/CMakeFiles/condition_two.dir/libmodman/test/condition_two.cpp.o
Scanning dependencies of target singleton
[ 29%] Linking CXX shared module test/modules/condition/condition_one.so
Building CXX object libmodman/CMakeFiles/singleton.dir/test/main.cpp.o
[ 29%] Built target condition_one
Scanning dependencies of target singleton_one
Linking CXX shared module test/modules/condition/condition_two.so
[ 32%] [ 32%] Built target condition_two
Scanning dependencies of target singleton_two
[ 35%] Building CXX object
libmodman/CMakeFiles/singleton_one.dir/libmodman/test/singleton_one.cpp.o
Building CXX object
libmodman/CMakeFiles/singleton_two.dir/libmodman/test/singleton_two.cpp.o
Linking CXX shared module test/modules/singleton/singleton_two.so
Linking CXX shared module test/modules/singleton/singleton_one.so
[ 35%] [ 35%] Built target singleton_one
Built target singleton_two
Scanning dependencies of target sorted_one
[ 38%] Building CXX object
libmodman/CMakeFiles/sorted_one.dir/libmodman/test/sorted_one.cpp.o
Scanning dependencies of target sorted
[ 41%] Linking CXX executable singleton
Building CXX object libmodman/CMakeFiles/sorted.dir/test/main.cpp.o
Linking CXX shared module test/modules/sorted/sorted_one.so
[ 41%] Built target sorted_one
Scanning dependencies of target sorted_two
[ 45%] Building CXX object
libmodman/CMakeFiles/sorted_two.dir/libmodman/test/sorted_two.cpp.o
[ 45%] Built target singleton
Scanning dependencies of target symbol
Linking CXX shared module test/modules/sorted/sorted_two.so
[ 48%] Building CXX object libmodman/CMakeFiles/symbol.dir/test/main.cpp.o
[ 48%] Built target sorted_two
Scanning dependencies of target symbol_one
[ 51%] Building CXX object
libmodman/CMakeFiles/symbol_one.dir/libmodman/test/symbol_one.cpp.o
Linking CXX executable sorted
[ 51%] Built target sorted
Scanning dependencies of target symbol_two
[ 54%] Building CXX object
libmodman/CMakeFiles/symbol_two.dir/libmodman/test/symbol_two.cpp.o
Linking CXX shared module test/modules/symbol/symbol_two.so
[ 54%] Built target symbol_two
Linking CXX shared module test/modules/symbol/symbol_one.so
Scanning dependencies of target symbollnk
[ 58%] [ 58%] Built target symbol_one
Scanning dependencies of target libproxy
Building CXX object libmodman/CMakeFiles/symbollnk.dir/test/main.cpp.o
Linking CXX executable symbol
[ 61%] Building CXX object
libproxy/CMakeFiles/libproxy.dir/extension_config.cpp.o
[ 61%] Built target symbol
[ 64%] Building CXX object
libproxy/CMakeFiles/libproxy.dir/extension_pacrunner.cpp.o
[ 67%] Building CXX object
libproxy/CMakeFiles/libproxy.dir/extension_wpad.cpp.o
[ 70%] Building CXX object libproxy/CMakeFiles/libproxy.dir/proxy.cpp.o
[ 74%] Building CXX object libproxy/CMakeFiles/libproxy.dir/url.cpp.o
Linking CXX executable symbollnk
[ 74%] Built target symbollnk
[ 77%] Building CXX object
libproxy/CMakeFiles/libproxy.dir/modules/config_envvar.cpp.o
[ 80%] Building CXX object
libproxy/CMakeFiles/libproxy.dir/modules/ignore_domain.cpp.o
[ 83%] Building CXX object
libproxy/CMakeFiles/libproxy.dir/modules/ignore_hostname.cpp.o
[ 87%] Building CXX object
libproxy/CMakeFiles/libproxy.dir/modules/ignore_ip.cpp.o
[ 90%] Building CXX object
libproxy/CMakeFiles/libproxy.dir/modules/pacrunner_mozjs.cpp.o
[ 93%] Building CXX object
libproxy/CMakeFiles/libproxy.dir/modules/wpad_dns_alias.cpp.o
Linking CXX shared library libproxy.so
[ 93%] Built target libproxy
Scanning dependencies of target proxy
Scanning dependencies of target config_gnome
[ 96%] Building C object utils/CMakeFiles/proxy.dir/proxy.c.o
[100%] Building CXX object
libproxy/CMakeFiles/config_gnome.dir/modules/config_gnome.cpp.o
Linking C executable proxy
/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.4/../../../../x86_64-pc-linux-gnu/bin/ld:
cannot find -lmozjs
collect2: ld returned 1 exit status
make[2]: *** [utils/proxy] Error 1
make[1]: *** [utils/CMakeFiles/proxy.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Linking CXX shared module config_gnome.so
[100%] Built target config_gnome
make: *** [all] Error 2

Original issue reported on code.google.com by thetes...@gmail.com on 18 May 2010 at 5:24

GoogleCodeExporter commented 9 years ago
Solved in 0.4.2. For the record, cmake has a interesting bugs where it flatten 
link
dependencies (for unknown reason) and does not handle the fact those libraries 
may
not be in standard directory. This can be worked around by creating global 
variable
(PARENT_SCOPE trick) for those directories and calling link_directories() in 
all the
CMakeList.txt (hugly hack, I know)

Original comment by nicolas.dufresne@gmail.com on 19 May 2010 at 6:14

GoogleCodeExporter commented 9 years ago
Forgot to mark as fixed.

Original comment by nicolas.dufresne@gmail.com on 19 May 2010 at 6:15

GoogleCodeExporter commented 9 years ago

Original comment by nicolas.dufresne@gmail.com on 7 Jun 2010 at 3:51