Changes between Initial Version and Version 1 of Ticket #67355
- Timestamp:
- May 2, 2023, 1:48:38 PM (18 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #67355
- Property Owner set to eborisch
-
Property
Status
changed from
new
toassigned
-
Ticket #67355 – Description
initial v1 1 I am running the last version of MacPorts and I installed with success hdf5 wiht +gcc12 +cxx. 2 My problem is that I need to compile a program in c++ the linking fails because it fails to find objects. 1 I am running the last version of MacPorts and I installed with success hdf5 wiht +gcc12 +cxx. \\ 2 My problem is that I need to compile a program in c++ the linking fails because it fails to find objects. \\ 3 3 As an example: 4 {{{ 4 5 Undefined symbols for architecture x86_64: 5 6 "__ZN2H510H5Location12iterateElemsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPiPFixPKcPvESC_", referenced from: … … 7 8 And the compiled libhdf5_cpp.a has: 8 9 __ZN2H510H5Location12iterateElemsERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPiPFixPKcPvESD_ 9 10 }}} 10 11 Compiling by hand the source with the ./configure options used in the compiled version of macports: 12 {{{ 11 13 ./configure --prefix=/opt/local --with-zlib=yes --disable-silent-rules --enable-build-mode=production --disable-fortran --enable-shared --enable-static --disable-parallel --disable-threadsafe --with-default-plugindir=/opt/local/lib/hdf5 --with-default-api-version=v110 --enable-hl --enable-cxx 12 14 }}} 13 15 generates an object that has the same problem because it uses clang to compile. 14 16 15 17 but adding CC and CXX variables: 18 {{{ 16 19 CXX=c++-mp-12 CC=gcc-mp-12 CXXFLAGS=-std=c++17 ./configure --prefix=/opt/local --with-zlib=yes --disable-silent-rules --enable-build-mode=production --disable-fortran --enable-shared --enable-static --disable-parallel --disable-threadsafe --with-default-plugindir=/opt/local/lib/hdf5 --with-default-api-version=v110 --enable-hl --enable-cxx 20 }}} 17 21 It already generates a library that has the objects. 18 22 19 My question is how does macports fix the compiler? Because I used the variant +gcc12 but it seems that it is not the same as defining the compilers as environment variables in the configure. 20 Do you have suggestions to fix this problem? 21 Thanks in advance 23 My question is how does macports fix the compiler? Because I used the variant +gcc12 but it seems that it is not the same as defining the compilers as environment variables in the configure. \\ 24 Do you have suggestions to fix this problem? \\ 25 Thanks in advance \\ 22 26 João