Opened 8 years ago
Closed 7 years ago
#53471 closed defect (fixed)
Failed to build qhull
Reported by: | gchinn (Gregory) | Owned by: | mamoll (Mark Moll) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.4.0 |
Keywords: | powerpc | Cc: | |
Port: | qhull |
Description (last modified by jmroot (Joshua Root))
Trying to install freecad. qhull failed to build. I've included an excerpt of the main.log
Files/qhalf.dir/src/qhalf/qhalf.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_qhull/qhull/work/qhull-2015.2/src/qhalf/qhalf.c :info:build [ 58%] Linking C executable qhalf :info:build /opt/local/bin/cmake -E cmake_link_script CMakeFiles/qhalf.dir/link.txt --verbose=ON :info:build /opt/local/bin/clang-mp-3.4 -pipe -Os -DNDEBUG -arch ppc -mmacosx-version-min=10.5 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/local/lib -Wl,-headerpad_max_install_names CMakeFiles/qhalf.dir/src/qhalf/qhalf.c.o -o qhalf -Wl,-rpath,/opt/local/lib libqhullstatic.a -lm :info:build ld: absolute address to symbol ___stdoutp in a different linkage unit not supported in _main from CMakeFiles/qhalf.dir/src/qhalf/qhalf.c.o :info:build collect2: ld returned 1 exit status :info:build clang: error: linker (via gcc) command failed with exit code 1 (use -v to see invocation) :info:build make[2]: *** [qhalf] Error 1 :info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_qhull/qhull/work/build' :info:build make[1]: *** [CMakeFiles/qhalf.dir/all] Error 2 :info:build make[1]: *** Waiting for unfinished jobs.... :info:build [ 59%] Building C object CMakeFiles/qhull_r.dir/src/libqhull_r/libqhull_r.c.o :info:build /opt/local/bin/clang-mp-3.4 -Dqhull_r_EXPORTS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_qhull/qhull/work/qhull-2015.2/src -pipe -Os -DNDEBUG -arch ppc -mmacosx-version-min=10.5 -fPIC -o CMakeFiles/qhull_r.dir/src/libqhull_r/libqhull_r.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_qhull/qhull/work/qhull-2015.2/src/libqhull_r/libqhull_r.c :info:build [ 59%] Building C object CMakeFiles/qhull_r.dir/src/libqhull_r/geom_r.c.o :info:build /opt/local/bin/clang-mp-3.4 -Dqhull_r_EXPORTS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_qhull/qhull/work/qhull-2015.2/src -pipe -Os -DNDEBUG -arch ppc -mmacosx-version-min=10.5 -fPIC -o CMakeFiles/qhull_r.dir/src/libqhull_r/geom_r.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_qhull/qhull/work/qhull-2015.2/src/libqhull_r/geom_r.c :info:build [ 60%] Building C object CMakeFiles/qhull_r.dir/src/libqhull_r/poly_r.c.o :info:build /opt/local/bin/clang-mp-3.4 -Dqhull_r_EXPORTS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_qhull/qhull/work/qhull-2015.2/src -pipe -Os -DNDEBUG -arch ppc -mmacosx-version-min=10.5 -fPIC -o CMakeFiles/qhull_r.dir/src/libqhull_r/poly_r.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_qhull/qhull/work/qhull-2015.2/src/libqhull_r/poly_r.c :info:build [ 61%] Building C object CMakeFiles/qhull_r.dir/src/libqhull_r/qset_r.c.o :info:build /opt/local/bin/clang-mp-3.4 -Dqhull_r_EXPORTS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_qhull/qhull/work/qhull-2015.2/src -pipe -Os -DNDEBUG -arch ppc -mmacosx-version-min=10.5 -fPIC -o CMakeFiles/qhull_r.dir/src/libqhull_r/qset_r.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_qhull/qhull/work/qhull-2015.2/src/libqhull_r/qset_r.c :info:build [ 62%] Building C object CMakeFiles/qhull_r.dir/src/libqhull_r/mem_r.c.o :info:build /opt/local/bin/clang-mp-3.4 -Dqhull_r_EXPORTS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_qhull/qhull/work/qhull-2015.2/src -pipe -Os -DNDEBUG -arch ppc -mmacosx-version-min=10.5 -fPIC -o CMakeFiles/qhull_r.dir/src/libqhull_r/mem_r.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_qhull/qhull/work/qhull-2015.2/src/libqhull_r/mem_r.c :info:build [ 62%] Building C object CMakeFiles/qhull_r.dir/src/libqhull_r/random_r.c.o :info:build /opt/local/bin/clang-mp-3.4 -Dqhull_r_EXPORTS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_qhull/qhull/work/qhull-2015.2/src -pipe -Os -DNDEBUG -arch ppc -mmacosx-version-min=10.5 -fPIC -o CMakeFiles/qhull_r.dir/src/libqhull_r/random_r.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_qhull/qhull/work/qhull-2015.2/src/libqhull_r/random_r.c :info:build [ 63%] Building C object CMakeFiles/qhull_r.dir/src/libqhull_r/usermem_r.c.o :info:build /opt/local/bin/clang-mp-3.4 -Dqhull_r_EXPORTS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_qhull/qhull/work/qhull-2015.2/src -pipe -Os -DNDEBUG -arch ppc -mmacosx-version-min=10.5 -fPIC -o CMakeFiles/qhull_r.dir/src/libqhull_r/usermem_r.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_qhull/qhull/work/qhull-2015.2/src/libqhull_r/usermem_r.c :info:build [ 64%] Building C object CMakeFiles/qhull_r.dir/src/libqhull_r/userprintf_r.c.o :info:build /opt/local/bin/clang-mp-3.4 -Dqhull_r_EXPORTS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_qhull/qhull/work/qhull-2015.2/src -pipe -Os -DNDEBUG -arch ppc -mmacosx-version-min=10.5 -fPIC -o CMakeFiles/qhull_r.dir/src/libqhull_r/userprintf_r.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_qhull/qhull/work/qhull-2015.2/src/libqhull_r/userprintf_r.c :info:build [ 64%] Building C object CMakeFiles/qhull_r.dir/src/libqhull_r/io_r.c.o :info:build /opt/local/bin/clang-mp-3.4 -Dqhull_r_EXPORTS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_qhull/qhull/work/qhull-2015.2/src -pipe -Os -DNDEBUG -arch ppc -mmacosx-version-min=10.5 -fPIC -o CMakeFiles/qhull_r.dir/src/libqhull_r/io_r.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_qhull/qhull/work/qhull-2015.2/src/libqhull_r/io_r.c :info:build [ 65%] Building C object CMakeFiles/qhull_r.dir/src/libqhull_r/user_r.c.o :info:build /opt/local/bin/clang-mp-3.4 -Dqhull_r_EXPORTS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_qhull/qhull/work/qhull-2015.2/src -pipe -Os -DNDEBUG -arch ppc -mmacosx-version-min=10.5 -fPIC -o CMakeFiles/qhull_r.dir/src/libqhull_r/user_r.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_qhull/qhull/work/qhull-2015.2/src/libqhull_r/user_r.c :info:build [ 66%] Building C object CMakeFiles/qhull_r.dir/src/libqhull_r/rboxlib_r.c.o :info:build /opt/local/bin/clang-mp-3.4 -Dqhull_r_EXPORTS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_qhull/qhull/work/qhull-2015.2/src -pipe -Os -DNDEBUG -arch ppc -mmacosx-version-min=10.5 -fPIC -o CMakeFiles/qhull_r.dir/src/libqhull_r/rboxlib_r.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_qhull/qhull/work/qhull-2015.2/src/libqhull_r/rboxlib_r.c :info:build [ 66%] Building C object CMakeFiles/qhull_r.dir/src/libqhull_r/userprintf_rbox_r.c.o :info:build /opt/local/bin/clang-mp-3.4 -Dqhull_r_EXPORTS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_qhull/qhull/work/qhull-2015.2/src -pipe -Os -DNDEBUG -arch ppc -mmacosx-version-min=10.5 -fPIC -o CMakeFiles/qhull_r.dir/src/libqhull_r/userprintf_rbox_r.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_qhull/qhull/work/qhull-2015.2/src/libqhull_r/userprintf_rbox_r.c :info:build [ 67%] Linking C shared library libqhull_r.dylib :info:build /opt/local/bin/cmake -E cmake_link_script CMakeFiles/qhull_r.dir/link.txt --verbose=ON :info:build /opt/local/bin/clang-mp-3.4 -pipe -Os -DNDEBUG -arch ppc -mmacosx-version-min=10.5 -dynamiclib -Wl,-headerpad_max_install_names -L/opt/local/lib -Wl,-headerpad_max_install_names -compatibility_version 7.0.0 -current_version 7.2.0 -o libqhull_r.7.2.0.dylib -install_name /opt/local/lib/libqhull_r.7.dylib CMakeFiles/qhull_r.dir/src/libqhull_r/global_r.c.o CMakeFiles/qhull_r.dir/src/libqhull_r/stat_r.c.o CMakeFiles/qhull_r.dir/src/libqhull_r/geom2_r.c.o CMakeFiles/qhull_r.dir/src/libqhull_r/poly2_r.c.o CMakeFiles/qhull_r.dir/src/libqhull_r/merge_r.c.o CMakeFiles/qhull_r.dir/src/libqhull_r/libqhull_r.c.o CMakeFiles/qhull_r.dir/src/libqhull_r/geom_r.c.o CMakeFiles/qhull_r.dir/src/libqhull_r/poly_r.c.o CMakeFiles/qhull_r.dir/src/libqhull_r/qset_r.c.o CMakeFiles/qhull_r.dir/src/libqhull_r/mem_r.c.o CMakeFiles/qhull_r.dir/src/libqhull_r/random_r.c.o CMakeFiles/qhull_r.dir/src/libqhull_r/usermem_r.c.o CMakeFiles/qhull_r.dir/src/libqhull_r/userprintf_r.c.o CMakeFiles/qhull_r.dir/src/libqhull_r/io_r.c.o CMakeFiles/qhull_r.dir/src/libqhull_r/user_r.c.o CMakeFiles/qhull_r.dir/src/libqhull_r/rboxlib_r.c.o CMakeFiles/qhull_r.dir/src/libqhull_r/userprintf_rbox_r.c.o -Wl,-rpath,/opt/local/lib -lm :info:build /opt/local/bin/cmake -E cmake_symlink_library libqhull_r.7.2.0.dylib libqhull_r.7.dylib libqhull_r.dylib :info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_qhull/qhull/work/build' :info:build [ 67%] Built target qhull_r :info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_qhull/qhull/work/build' :info:build make: *** [all] Error 2 :info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_qhull/qhull/work/build' :info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_qhull/qhull/work/build" && /usr/bin/make -j2 -w all VERBOSE=ON :info:build Exit code: 2 :error:build Failed to build qhull: command execution failed :debug:build Error code: CHILDSTATUS 1312 2 :debug:build Backtrace: command execution failed :debug:build while executing :debug:build "system {*}$notty {*}$nice $fullcmdstring" :debug:build invoked from within :debug:build "command_exec build" :debug:build (procedure "portbuild::build_main" line 8) :debug:build invoked from within :debug:build "$procedure $targetname" :debug:build invalid command name "::ui_init" :debug:build while executing :debug:build "::ui_init $priority $prefix $channels($priority) {*}$args" :debug:build ("uplevel" body line 2) :debug:build invoked from within :debug:build "uplevel 1 $body"
Attachments (3)
Change History (16)
comment:1 Changed 8 years ago by jmroot (Joshua Root)
Cc: | port info --maintainers qhull removed |
---|---|
Description: | modified (diff) |
Owner: | set to mamoll |
Status: | new → assigned |
comment:2 Changed 8 years ago by gchinn (Gregory)
Cc: | gchinn added |
---|
comment:3 Changed 8 years ago by mf2k (Frank Schima)
Cc: | gchinn removed |
---|
comment:4 follow-up: 5 Changed 8 years ago by kencu (Ken)
- usually you fix this error on 10.5 PPC
ld: absolute address to symbol ___stdoutp in a different linkage unit
by adding -fPIC or similar to the configure line.
- building anything on 10.5 PPC with clang-3.4 is likely to lead to disaster
Changed 8 years ago by gchinn (Gregory)
comment:5 Changed 8 years ago by gchinn (Gregory)
Replying to kencu:
- usually you fix this error on 10.5 PPC
ld: absolute address to symbol ___stdoutp in a different linkage unit
by adding -fPIC or similar to the configure line.
- building anything on 10.5 PPC with clang-3.4 is likely to lead to disaster
kencu, I tried installing qhull with gcc44. I am no longer getting that linker error, however, I'm getting these errors in the above attachment. You mentioned that clang, may be at the root of the problem. Any suggestions as to which compiler may best suited. I'm going to uninstall clang temporarily and try other compilers. Is there any drawbacks to this plan. Thanks.
comment:6 Changed 8 years ago by kencu (Ken)
ld: half word text relocs not supported in _main for architecture ppc
this is another common error on PPC. the solution is usually to use a flag that my memory tells me is -no-text-relocs
. You'll need to google that a bit to make sure that I have it exactly correct. Also, you need to see where to add it -- in cflags, cxxflags, or ldflags -- or several or all of those.
making things work on 10.5 PPC is without doubt sometimes a bit of a project, but you have found the two most common simple errors to fix, I think.
This page: UsingTheRightCompiler will give you a list of the available compilers for macports. After that, it's a matter of some trial and error.
I see in the qhull portfile
bbedit `port file qhull`
that all gcc compilers <4.7 have been blacklisted, and a bunch of clangs as well. So there's a clue that you'll need at a minimum gcc-4.7.
for a start, I'd try something like gcc 4.7 or 4.8
sudo port install qhull configure.compiler=macports-gcc-4.7
and see what happens.
At the moment, there are problems building some versions of gcc due to textinfo incompatibilities (there are workarounds on trac). If you go past gcc-4.7 then you might run into libstdc++ incompatability (long discussions on trac or on the mailing list).
So you see, in the end, to use 10.5 PPC with the current modern software will usually take a bit of work, and also some time, and some more-than-basic macports knowledge. But it's rewarding, and if you succeed, please share your knowledge so that others may benefit.
comment:7 follow-up: 8 Changed 8 years ago by kencu (Ken)
OK. So I had a few minutes, and so I found a way to build qhull on 10.5 PPC. There were a couple of wrinkles, mostly revolving around the fact that gcc-4.8 doesn't know what the -arch
flag is, and errors out. So you need to override that flag from being produced.
You need to edit the portfile with your favourite editor and change a couple of things near the top of the portfile, so it looks like so:
PortSystem 1.0 PortGroup cmake 1.1 PortGroup compiler_blacklist_versions 1.0 cmake.out_of_source yes cmake.set_osx_architectures no
then, build it like this
sudo port -v install qhull configure.compiler=macports-gcc-4.8
and you get a completed build, that looks OK.
$ port -v installed qhull The following ports are currently installed: qhull @2015.2_1 (active) platform='darwin 9' archs='ppc' date='2017-02-04T18:46:09-0800'
If you get this far, please test it in some way and see if it works correctly for you. Hope this helps -- K
comment:8 Changed 8 years ago by gchinn (Gregory)
Replying to kencu:
OK. So I had a few minutes, and so I found a way to build qhull on 10.5 PPC. There were a couple of wrinkles, mostly revolving around the fact that gcc-4.8 doesn't know what the
-arch
flag is, and errors out. So you need to override that flag from being produced.You need to edit the portfile with your favourite editor and change a couple of things near the top of the portfile, so it looks like so:
PortSystem 1.0 PortGroup cmake 1.1 PortGroup compiler_blacklist_versions 1.0 cmake.out_of_source yes cmake.set_osx_architectures nothen, build it like this
sudo port -v install qhull configure.compiler=macports-gcc-4.8and you get a completed build, that looks OK.
$ port -v installed qhull The following ports are currently installed: qhull @2015.2_1 (active) platform='darwin 9' archs='ppc' date='2017-02-04T18:46:09-0800'If you get this far, please test it in some way and see if it works correctly for you. Hope this helps -- K
kencu, while I was waiting for a reply to my last comment, I decided to install two other programs, cmus, then terminator. Initially, both failed with the same error: " command execution failed". At the time, I was using mp-gcc44. So then, I returned to the installation of qhull separately. I uninstalled mp-clang-3.4, only to have it reinstall as a dependency of either qhull or freecad. The next morning, I retried cmus after switching back to gcc42 and it installed with no errors and works perfectly. I retried terminator and gtk3 failed to install with the same error that was discussed in Ticket #52468. On that ticket, kencu asked, "why was he using clang34?". Once clang was installed, macports must have set it as default, because I didn't. I'm going to finish reading this ticket throughly, and hopefully, it may contain information to help solve both problems since clang is present during both compilations. I followed the one of the instructions on that ticket; installed switch to gcc6 and using the compiler argument with port. Qhull, gtk3 and terminator finally installed but getting terminator to run from the command line shows errors that I will address later.
So, then I returned to the installation of freecad. Now, there is a problem with py27-shiboken. Over the past six month, I have tried to freecad on this g5 and an emac, both running leopard using macports-2.3.5 and the installation has always stopped at py27-setuptools or py27-shiboken. but not qhull One of the errors was so dumbfounding that I gave up on macports and tried fink, homebrew, and several ppc distro, including freebsd. "Error: py27-shiboken could not be installed because py27-shiboken was not installed". Eventually, I realized that I should stick one method instead of jumping around, I came back to macports and decided to enlist the help of macports trac. Before proceeding, should I file a new ticket for py27-shiboken or should it be left together for anyone trying to install freecad in the future if my efforts are successful. My apology, if this post isn't too long. Gregory
comment:9 Changed 8 years ago by kencu (Ken)
thanks. I sense your frustration. Macports tries hard to support this, but it is on a 'best effort' basis as having modern things run on PPC is a bit of a miracle. Still, and kudos to macports here, most things will run. You will need patience and some skills.
- please try to stick to the topic of the trac ticket. It's hard to help otherwise. For a new issue, open a new ticket or add to another one that already has the issue open.
- clang (all versions) are basically useless on PPC, for all intents and purposes. I am working on clang-3.8, with some progress, but I fear even that will be useless as it generates damaged code. So stick with gcc-4.2, llvm-gcc4.2, or newer version of gcc (they all work nicely, up to 6.x. I haven't tried 7 yet). clang-3.4 might get called in by accident (it works OK on Intel) -- sorry about that. Essentially, all PPC machines should blacklist clang. For now, you might need to override it, as I did in the qhull port above.
- expect problems and workarounds. Not many have PPC machines anymore, so nobody tests the ports on them.
comment:10 Changed 8 years ago by gchinn (Gregory)
What I'm experiencing now with macports reminds me of linux package managers during the late 1990's/early 2000's when they were in their infancy but as time progressed they became reliable. Although, it is inevitable that ports for ppc architecture will no longer be supported in the very near future, still, I feel that this dual core 2.0Ghz, 16Gb, Quadro FX 4500 powerpc is worth the effort. I know that I lack experience with macports and programming, but I take this as an opportunity to learn as much as I can because this machine still could be used for graphics/cad. Thanks to previous tickets, I have been able to install all dependencies using different compilers. However, I read that using several compilers may cause runtime issues down the road. Before I ran into the problem with qhull, I had used the default compiler which I think is gcc4.0 to install all dependencies up to that point. With py27shiboken, I tried gcc{6,5,4.2.4.5}, but I did not keep the log files explaining those errors. Eventually, I tried the "-s" option with gcc48 and it installed with no errors. Also py27-shiboken had a dependency of sparsehash, swig, swig-python, which were not installed before py27-shiboken. When I tried to install freecad, it failed to configure. This is the log file for freecad. I tried to install with gcc(4.4,4.8,4.9,5) and all failed with similar error in the attachment. Gcc6 failed with a linker error. I think I made a mistake with the compiler I used. I had gotten tired and forgot what I was doing. I shutdown after that. Even though pyside and pyside-tools installed, during the build there were a lot warnings of issues(more than 300). I was going to sent the log file for them, but there's no entry for them. I'm guessing that if a package installs, port cleans up the log file. After using all of those different compilers, do you think freecad will function adequately, or will I has to reinstall those dependencies using the same compiler?
Changed 8 years ago by gchinn (Gregory)
Attachment: | gcc6-freecad added |
---|
comment:12 Changed 8 years ago by kencu (Ken)
The approach here is to find the first error ("Error 1") and see what happened.
So the issue in that gcc6-freecad log seems to be that one of the libboost libraries doesn't have ppc code in it to link to. So the approach would be to figure out which library it is (use the flle
command), and then dig into the boost build to see what's going on.
comment:13 Changed 7 years ago by kencu (Ken)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
As reporter, you do not need to Cc yourself.