Opened 10 years ago

Last modified 9 years ago

#42368 new defect

phantomjs @1.9.7_0 build error - undefined symbols for achitecture x86_64

Reported by: tonior@… Owned by: stromnov (Andrey Stromnov)
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: Cc: hayato_1980@…
Port: phantomjs

Description

  • OS X Mavericks (10.9.1)
  • XCode 5.0.2, command line tools installed
  • MacPorts apple-gcc42 5666.3_13

Error upgrading phantomjs to version 1.9.7_0

Attachments (2)

main.log (711.1 KB) - added by tonior@… 10 years ago.
phantomjs build log
main.2.log (15.4 KB) - added by tonior@… 10 years ago.
PATH=/usr/bin:$PATH sudo port upgrade phantomjs

Download all attachments as: .zip

Change History (20)

Changed 10 years ago by tonior@…

Attachment: main.log added

phantomjs build log

comment:1 Changed 10 years ago by tonior@…

Any progress on this?

comment:2 Changed 10 years ago by mf2k (Frank Schima)

Cc: stromnov@… removed
Owner: changed from macports-tickets@… to stromnov@…

comment:3 Changed 10 years ago by tonior@…

Is the owner/maintaner for this port still active?

comment:4 Changed 10 years ago by stromnov (Andrey Stromnov)

Yes, but I can't reproduce this issue.

comment:5 Changed 10 years ago by tonior@…

Looking over the attached log, could you suggest what might be the problem on my end, then? Should I be using some other version of gcc?

comment:6 Changed 10 years ago by stromnov (Andrey Stromnov)

You can try to install binary version of phantomjs (if available from buildbot) via 'sudo port -b install phantomjs'.

Or you can try to change compiler (via PATH environment and custom g++ symlink to preferred compiler).

comment:7 Changed 10 years ago by tonior@…

"sudo port -b install phantomjs' failed, apparently no binary version is available.

I tried building with: apple-gcc42, mp-gcc45, mp-gcc47, mp-gcc48, and mp-llvm-gcc42, and my built-in Apple LLVM clang-503.0.40, and all failed. Some fail with an "unrecognized command line option '-fconstant-cfstrings'", while others fail with the "undefined symbols" mentioned before.

I'm considering uninstalling phantomjs and trying a fresh install, but not only can't I think why that might work, but I also don't want to be stuck without ANY version of phantomjs.

comment:8 Changed 10 years ago by stromnov (Andrey Stromnov)

For some reason this port use g++ compiler from PATH and doesn't follow configure.compiler setting.

comment:9 Changed 10 years ago by tonior@…

Ok, so which compiler should I use in order to properly build?

comment:10 Changed 10 years ago by stromnov (Andrey Stromnov)

"Apple LLVM version 5.1 (clang-503.0.40)" works for me.

comment:11 Changed 10 years ago by tonior@…

$ PATH=/usr/bin:$PATH g++ --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix
$ PATH=/usr/bin:$PATH sudo port upgrade phantomjs
--->  Computing dependencies for phantomjs
--->  Fetching archive for phantomjs
--->  Attempting to fetch phantomjs-1.9.7_0.darwin_13.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/phantomjs
--->  Attempting to fetch phantomjs-1.9.7_0.darwin_13.x86_64.tbz2 from http://nue.de.packages.macports.org/macports/packages/phantomjs
--->  Attempting to fetch phantomjs-1.9.7_0.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/phantomjs
--->  Fetching distfiles for phantomjs
--->  Verifying checksums for phantomjs
--->  Extracting phantomjs
--->  Applying patches to phantomjs
--->  Configuring phantomjs
--->  Building phantomjs
Error: org.macports.build for port phantomjs returned: command execution failed
Please see the log file for port phantomjs for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_phantomjs/phantomjs/main.log
Error: Unable to upgrade port: 1
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Last edited 10 years ago by tonior@… (previous) (diff)

Changed 10 years ago by tonior@…

Attachment: main.2.log added

PATH=/usr/bin:$PATH sudo port upgrade phantomjs

comment:12 Changed 10 years ago by stromnov (Andrey Stromnov)

So, you can run last failed command (g++ -headerpad_max_install_names -sectcreate TEXT info_plist Info.plist -arch x86_64 -Xarch_x86_64 ... ) by hand with additional verbose flags and trace output. There are non-zero possibility that some library (QT, for example) taken from wrong path.

comment:13 Changed 10 years ago by tonior@…

I'm sorry, I'm not familiar enough with this to understand what you're asking me to do. =(

comment:14 Changed 10 years ago by stromnov (Andrey Stromnov)

1) Go to build path (see line with ":info:build Command failed: " string)

2) Take line 1270 from your log (last command with g++ invocation), strip :info:build part

3) Insert "-v -Wl,-v" after g++

4) Run command

5) Post output

comment:15 Changed 10 years ago by tonior@…

$ g++ -v -Wl,-v -headerpad_max_install_names -sectcreate __TEXT __info_plist Info.plist -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -o ../bin/phantomjs MachIPC.o phantom.o callback.o webpage.o webserver.o main.o csconverter.o utils.o networkaccessmanager.o cookiejar.o filesystem.o system.o env.o terminal.o encoding.o config.o childprocess.o repl.o gif_err.o gifalloc.o egif_lib.o gif_hash.o quantize.o gifwriter.o mongoose.o linenoise.o utf8.o qcommandline.o minidump_file_writer.o convert_UTF.o md5.o string_conversion.o crash_generation_client.o exception_handler.o minidump_generator.o dynamic_images.o breakpad_nlist_64.o bootstrap_compat.o file_id.o macho_id.o macho_utilities.o macho_walker.o string_utilities.o moc_phantom.o moc_callback.o moc_webpage.o moc_webserver.o moc_networkaccessmanager.o moc_cookiejar.o moc_filesystem.o moc_system.o moc_env.o moc_config.o moc_childprocess.o moc_repl.o moc_qcommandline.o qrc_phantomjs.o qrc_ghostdriver.o qrc_WebKit.o qrc_InspectorBackendStub.o    -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_phantomjs/phantomjs/work/phantomjs-1.9.7/src/qt/lib -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_phantomjs/phantomjs/work/phantomjs-1.9.7/src/qt/plugins/codecs -lqcncodecs -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_phantomjs/phantomjs/work/phantomjs-1.9.7/src/qt/lib -framework ApplicationServices -framework CoreFoundation -framework Security -lqjpcodecs -lqkrcodecs -lqtwcodecs -lQtWebKit -framework Carbon -framework AppKit -framework SystemConfiguration -framework CoreServices -lQtGui -lQtNetwork -lQtCore -lz -lm
Using built-in specs.
Target: i686-apple-darwin13
Configured with: /opt/local/var/macports/build/_opt_mports_dports_lang_apple-gcc42/apple-gcc42/work/objroot/src/configure --disable-checking --prefix=/opt/local --mandir=/opt/local/share/man --enable-languages=c,c++,objc,obj-c++ --libexecdir=/opt/local/libexec/apple-gcc42 --libdir=/opt/local/lib/apple-gcc42 --includedir=/opt/local/include/apple-gcc42 --program-suffix=-apple-4.2 --with-system-zlib --disable-nls --with-slibdir=/usr/lib --build=x86_64-apple-darwin13 --enable-werror-always --program-prefix=i686-apple-darwin13- --host=x86_64-apple-darwin13 --target=i686-apple-darwin13 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5666) (dot 3) (MacPorts apple-gcc42 5666.3_13)
 /opt/local/libexec/apple-gcc42/gcc/i686-apple-darwin13/4.2.1/collect2 -dynamic -arch x86_64 -headerpad_max_install_names -macosx_version_min 10.5 -sectcreate __TEXT __info_plist Info.plist -weak_reference_mismatches non-weak -o ../bin/phantomjs -lcrt1.10.5.o -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_phantomjs/phantomjs/work/phantomjs-1.9.7/src/qt/lib -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_phantomjs/phantomjs/work/phantomjs-1.9.7/src/qt/plugins/codecs -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_phantomjs/phantomjs/work/phantomjs-1.9.7/src/qt/lib -L/opt/local/lib/apple-gcc42/gcc/i686-apple-darwin13/4.2.1/x86_64 -L/opt/local/lib/apple-gcc42/gcc/i686-apple-darwin13/4.2.1 -L/opt/local/lib/apple-gcc42/gcc/i686-apple-darwin13/4.2.1/../../.. -v MachIPC.o phantom.o callback.o webpage.o webserver.o main.o csconverter.o utils.o networkaccessmanager.o cookiejar.o filesystem.o system.o env.o terminal.o encoding.o config.o childprocess.o repl.o gif_err.o gifalloc.o egif_lib.o gif_hash.o quantize.o gifwriter.o mongoose.o linenoise.o utf8.o qcommandline.o minidump_file_writer.o convert_UTF.o md5.o string_conversion.o crash_generation_client.o exception_handler.o minidump_generator.o dynamic_images.o breakpad_nlist_64.o bootstrap_compat.o file_id.o macho_id.o macho_utilities.o macho_walker.o string_utilities.o moc_phantom.o moc_callback.o moc_webpage.o moc_webserver.o moc_networkaccessmanager.o moc_cookiejar.o moc_filesystem.o moc_system.o moc_env.o moc_config.o moc_childprocess.o moc_repl.o moc_qcommandline.o qrc_phantomjs.o qrc_ghostdriver.o qrc_WebKit.o qrc_InspectorBackendStub.o -lqcncodecs -framework ApplicationServices -framework CoreFoundation -framework Security -lqjpcodecs -lqkrcodecs -lqtwcodecs -lQtWebKit -framework Carbon -framework AppKit -framework SystemConfiguration -framework CoreServices -lQtGui -lQtNetwork -lQtCore -lz -lm -lstdc++ -lgcc_s.10.5 -lgcc -lSystem
collect2 version 4.2.1 (Apple Inc. build 5666) (dot 3) (MacPorts apple-gcc42 5666.3_13) (i686 Darwin)
/opt/local/libexec/apple-gcc42/gcc/i686-apple-darwin13/4.2.1/ld -dynamic -arch x86_64 -headerpad_max_install_names -macosx_version_min 10.5 -sectcreate __TEXT __info_plist Info.plist -weak_reference_mismatches non-weak -o ../bin/phantomjs -lcrt1.10.5.o -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_phantomjs/phantomjs/work/phantomjs-1.9.7/src/qt/lib -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_phantomjs/phantomjs/work/phantomjs-1.9.7/src/qt/plugins/codecs -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_phantomjs/phantomjs/work/phantomjs-1.9.7/src/qt/lib -L/opt/local/lib/apple-gcc42/gcc/i686-apple-darwin13/4.2.1/x86_64 -L/opt/local/lib/apple-gcc42/gcc/i686-apple-darwin13/4.2.1 -L/opt/local/lib/apple-gcc42/gcc/i686-apple-darwin13/4.2.1/../../.. -v MachIPC.o phantom.o callback.o webpage.o webserver.o main.o csconverter.o utils.o networkaccessmanager.o cookiejar.o filesystem.o system.o env.o terminal.o encoding.o config.o childprocess.o repl.o gif_err.o gifalloc.o egif_lib.o gif_hash.o quantize.o gifwriter.o mongoose.o linenoise.o utf8.o qcommandline.o minidump_file_writer.o convert_UTF.o md5.o string_conversion.o crash_generation_client.o exception_handler.o minidump_generator.o dynamic_images.o breakpad_nlist_64.o bootstrap_compat.o file_id.o macho_id.o macho_utilities.o macho_walker.o string_utilities.o moc_phantom.o moc_callback.o moc_webpage.o moc_webserver.o moc_networkaccessmanager.o moc_cookiejar.o moc_filesystem.o moc_system.o moc_env.o moc_config.o moc_childprocess.o moc_repl.o moc_qcommandline.o qrc_phantomjs.o qrc_ghostdriver.o qrc_WebKit.o qrc_InspectorBackendStub.o -lqcncodecs -framework ApplicationServices -framework CoreFoundation -framework Security -lqjpcodecs -lqkrcodecs -lqtwcodecs -lQtWebKit -framework Carbon -framework AppKit -framework SystemConfiguration -framework CoreServices -lQtGui -lQtNetwork -lQtCore -lz -lm -lstdc++ -lgcc_s.10.5 -lgcc -lSystem
@(#)PROGRAM:ld  PROJECT:ld64-136
configured to support archs: i386 x86_64 armv7 armv7s
Library search paths:
	/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_phantomjs/phantomjs/work/phantomjs-1.9.7/src/qt/lib
	/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_phantomjs/phantomjs/work/phantomjs-1.9.7/src/qt/plugins/codecs
	/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_phantomjs/phantomjs/work/phantomjs-1.9.7/src/qt/lib
	/opt/local/lib/apple-gcc42/gcc/i686-apple-darwin13/4.2.1/x86_64
	/opt/local/lib/apple-gcc42/gcc/i686-apple-darwin13/4.2.1
	/opt/local/lib/apple-gcc42
	/usr/lib
	/usr/local/lib
Framework search paths:
	/Library/Frameworks/
	/System/Library/Frameworks/
ld: library not found for -lQtWebKit
collect2: ld returned 1 exit status

Note, though, that this is different from the error I see in the log file. Also note that I used apple-gcc42, rather than clang-503, since you were referring to the first main.log I posted, which was using apple-gcc42.

Last edited 10 years ago by tonior@… (previous) (diff)

comment:16 Changed 9 years ago by hayato_1980@…

Cc: hayato_1980@… added

Cc Me!

comment:17 Changed 9 years ago by hayato_1980@…

Cc: hayato_1980@… removed

Cc Me!

comment:18 Changed 9 years ago by hayato_1980@…

Cc: hayato_1980@… added

Cc Me!

Note: See TracTickets for help on using tickets.