Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#42841 closed defect (fixed)

clhep @2.1.4.1: fails to link with clang 3.4 (Undefined symbols for architecture x86_64: CLHEP::HepVector::num_row() const)

Reported by: graziosi.angelo@… Owned by: mojca (Mojca Miklavec)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: hapaguy (Brian Kurt Fujikawa)
Port: clhep

Description (last modified by mojca (Mojca Miklavec))

Today:

$ sudo port upgrade outdated
...
--->  Computing dependencies for clhep
--->  Fetching archive for clhep
--->  Attempting to fetch clhep-2.1.4.1_0.darwin_13.x86_64.tbz2 from http://nue.de.packages.macports.org/macports/packages/clhep
--->  Attempting to fetch clhep-2.1.4.1_0.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/clhep
--->  Attempting to fetch clhep-2.1.4.1_0.darwin_13.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/clhep
--->  Fetching distfiles for clhep
--->  Attempting to fetch clhep-2.1.4.1.tgz from http://fco.it.distfiles.macports.org/mirrors/macports-distfiles/clhep
--->  Attempting to fetch clhep-2.1.4.1.tgz from http://proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/tarFiles/
--->  Verifying checksums for clhep
--->  Extracting clhep
--->  Configuring clhep
--->  Building clhep
Error: org.macports.build for port clhep returned: command execution failed
Please see the log file for port clhep for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_clhep/clhep/main.log
Error: Unable to upgrade port: 1
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
:info:build Linking CXX executable testMatrix
:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_clhep/clhep/work/build/Matrix/test && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/testMatrix.dir/link.txt --verbose=1
:info:build /usr/bin/clang++   -O -pedantic -Wall -pipe -Os -arch x86_64  -DDISABLE_ALLOC -DINSTALLATION_CHECK -DNDEBUG -arch x86_64 -Wl,-search_paths_first -Wl,-headerpad_max_install_names  -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 CMakeFiles/testMatrix.dir/testMatrix.cc.o  -o testMatrix  ../../lib/libCLHEP-Matrix-2.1.4.1.a ../../lib/libCLHEP-Matrix-2.1.4.1.a ../../lib/libCLHEP-Matrix-2.1.4.1.a ../../lib/libCLHEP-Random-2.1.4.1.dylib ../../lib/libCLHEP-Vector-2.1.4.1.dylib -Wl,-rpath,/opt/local/lib 
:info:build Undefined symbols for architecture x86_64:
:info:build   "CLHEP::HepVector::num_row() const", referenced from:
:info:build       CLHEP::HepRandomVector::operator()() in RandomVector.cc.o
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_clhep/clhep/work/build'
:info:build /opt/local/bin/cmake -E cmake_progress_report /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_clhep/clhep/work/build/CMakeFiles 
:info:build ld: symbol(s) not found for architecture x86_64
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)
:info:build make[2]: *** [lib/libCLHEP-RandomObjects-2.1.4.1.dylib] Error 1
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_clhep/clhep/work/build'
:info:build make[1]: *** [RandomObjects/src/CMakeFiles/RandomObjects.dir/all] Error 2
:info:build make[1]: *** Waiting for unfinished jobs....
:info:build [100%] Built target testMatrix

Attachments (1)

clhep-2.1.4.1_0-main.log.bz2 (19.3 KB) - added by graziosi.angelo@… 6 years ago.
the main.log file

Download all attachments as: .zip

Change History (13)

Changed 6 years ago by graziosi.angelo@…

the main.log file

comment:1 Changed 6 years ago by mojca (Mojca Miklavec)

Cc: mojca@… removed
Description: modified (diff)
Keywords: clhep geant4 removed
Owner: changed from macports-tickets@… to mojca@…
Version: 2.2.1

comment:2 Changed 6 years ago by mojca (Mojca Miklavec)

The problem is that I'm unable to reproduce this.

Just for the sake of testing, can you please check if the problem goes away when adding

use_parallel_build no

to the Portfile? I don't know if that would help at all, but it seems totally weird to me why this would fail on one machine, but not on the other.

comment:3 Changed 6 years ago by mojca (Mojca Miklavec)

There's another problem connected with the clhep upgrade. I wasn't careful enough and didn't notice that the buildbots were off-duty. I wanted to make sure that the package would build successfully before upgrading geant4 (I have a pending upgrade to 10.0.p01).

Now (and particularly after hearing about your problems) I'm not sure what to do about geant4. Wait for the builbots to come back?

comment:4 Changed 6 years ago by hapaguy (Brian Kurt Fujikawa)

Cc: brian.fujikawa@… added

Cc Me!

comment:5 in reply to:  3 Changed 6 years ago by graziosi.angelo@…

Replying to mojca@…:

There's another problem connected with the clhep upgrade. I wasn't careful enough and didn't notice that the buildbots were off-duty. I wanted to make sure that the package would build successfully before upgrading geant4 (I have a pending upgrade to 10.0.p01).

Now (and particularly after hearing about your problems) I'm not sure what to do about geant4. Wait for the builbots to come back?

I can't suggest you what to do.. it seem you are in the list of the mainatiners of this package. After a cleaning I tried newly to upgrade clhep but it fails... What I can add is the here is on

OSX 10.9.2
Xcode 5.1
commandline tool 5.1

Ciao,

Angelo.

comment:6 Changed 6 years ago by ryandesign (Ryan Schmidt)

I'll reproduce here some information I sent to Mojca by email:

I am also able to reproduce the issue on Mavericks with Xcode 5.1 which has this version of clang:

Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)

The problem also occurs with configure.compiler=macports-clang-3.4.

The build succeeds using configure.compiler=macports-clang-3.3.

This suggests that you should be able to reproduce the issue on other OS X versions using configure.compiler=macports-clang-3.4, and that the developer could reproduce the issue on Linux or whatever by using clang 3.4. It does not sound like a MacPorts or Mac-specific issue; in your bug report I would just mention the clang versions and not mention MacPorts or OS X.

You should be able to make the build work on Mavericks by blacklisting newer versions of clang:

PortGroup compiler_blacklist_versions 1.0
…
compiler.blacklist {clang > 503} macports-clang-3.4 macports-clang-3.5

Additionally, this does not mean this is “clang’s fault”. New versions of clang often include new errors and warnings, and this often indicates a subtle problem with the project’s source code that should be corrected, not a bug in clang.

comment:7 Changed 6 years ago by mojca (Mojca Miklavec)

Resolution: fixed
Status: newclosed
Summary: Failure upgrading clhepclhep @2.1.4.1: fails to link with clang 3.4 (Undefined symbols for architecture x86_64: CLHEP::HepVector::num_row() const)

Ryan's suggestion to blacklist certain compilers committed in r117888. Thanks a lot.

I have no way to test how this behaves together with, say, Geant4 with Xcode 5.1, so please let me know if there are still problems.)

Ryan, thanks a lot for tracking it down. I first wanted to find the problematic commit, but then I realized that the reason for the newly introduced failure was purely because Apple only recently switched to clang 3.4. I opened a ticket at https://savannah.cern.ch/bugs/?104110.

comment:8 in reply to:  7 Changed 6 years ago by graziosi.angelo@…

Replying to mojca@…:

I have no way to test how this behaves together with, say, Geant4 with Xcode 5.1, so please let me know if there are still problems.)

clhep, now, upgrades but geant4 fails to upgrade. See #42875.

Ciao, Angelo.

comment:9 Changed 6 years ago by mojca (Mojca Miklavec)

Can you please test r118375? (Someone posted a patch to the upstream bug tracker. It works for me on 10.7. But I suspect that Geant4 still fails to build.)

comment:10 in reply to:  9 Changed 6 years ago by graziosi.angelo@…

Hmm...

Replying to mojca@…:

Can you please test r118375? (Someone posted a patch to the upstream bug tracker. It works for me on 10.7. But I suspect that Geant4 still fails to build.)

I have just selfupdated,

$ sudo port selfupdate
Password:
--->  Updating MacPorts base sources using rsync
MacPorts base version 2.2.1 installed,
MacPorts base version 2.2.1 downloaded.
--->  Updating the ports tree
--->  MacPorts base is already the latest version

The ports tree has been updated. To upgrade your installed ports, you should run
  port upgrade outdated

but it does not propose clhep upgrade,

$ sudo port outdated
The following installed ports are outdated:
tesseract-eng                  3.02_0 < 3.02_1
tesseract-ita                  3.02_0 < 3.02_1

Ciao, Angelo.

comment:11 Changed 6 years ago by mojca (Mojca Miklavec)

The idea is to just try to build it, with one of the following commands:

sudo port -v build clhep
sudo port -v destroot clhep

There is no need to increase the revision.

comment:12 in reply to:  11 Changed 6 years ago by graziosi.angelo@…

Ciao Mojca,

Replying to mojca@…:

The idea is to just try to build it, with one of the following commands:

sudo port -v build clhep
sudo port -v destroot clhep

here (10.9.2, Xcode 5.1-5B130a, CLDT-5.1), the above works...

Ciao, Angelo.

Note: See TracTickets for help on using tickets.