Opened 9 months ago

Closed 9 months ago

Last modified 9 months ago

#69296 closed defect (duplicate)

poppler @24.01.0 fails to build on PPC Tiger, Mac OS X 10.4.11, because of some insane ld option: --as-needed

Reported by: ballapete (Peter "Pete" Dyballa) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.9.1
Keywords: ppc tiger Cc: dbevans (David B. Evans), mascguy (Christopher Nielsen)
Port: poppler

Description

The build starts with configure phase when one patch set is removed, see #67266. This phase ends here:

CMake Error at CMakeLists.txt:162 (MESSAGE):
  Could not find the 1.19 version of Gpgmepp.  If you're not interested in
  the features it provides set the cmake ENABLE_GPGME option to OFF
Call Stack (most recent call first):
  CMakeLists.txt:168 (find_soft_mandatory_package)


-- Configuring incomplete, errors occurred!
See also "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_graphics_poppler/poppler/work/build/CMakeFiles/CMakeOutput.log".
See also "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_graphics_poppler/poppler/work/build/CMakeFiles/CMakeError.log".
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_graphics_poppler/poppler/work/build" && /opt/local/bin/cmake -G "CodeBlocks - Unix Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX="/opt/local" -DCMAKE_INSTALL_NAME_DIR="/opt/local/lib" -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/usr" -DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_OBJC_COMPILER="$CC" -DCMAKE_OBJCXX_COMPILER="$CXX" -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_POLICY_DEFAULT_CMP0060=NEW -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_MAKE_PROGRAM=/opt/local/bin/gmake -DCMAKE_MODULE_PATH="/opt/local/share/cmake/Modules" -DCMAKE_PREFIX_PATH="/opt/local/share/cmake/Modules" -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON -DCMAKE_INSTALL_RPATH="/opt/local/lib" -Wno-dev -DBUILD_CPP_TESTS=OFF -DBUILD_GTK_TESTS=OFF -DBUILD_MANUAL_TESTS=OFF -DBUILD_QT5_TESTS=OFF -DBUILD_QT6_TESTS=OFF -DENABLE_BOOST=ON -DENABLE_QT5=OFF -DENABLE_QT6=OFF -DENABLE_UNSTABLE_API_ABI_HEADERS=ON -DGLIB2_MKENUMS_PYTHON=/opt/local/bin/python3.11 -DRUN_GPERF_IF_PRESENT=OFF -DWITH_NSS3=ON -DENABLE_GOBJECT_INTROSPECTION=ON -DBOOST_ROOT=/opt/local/libexec/boost/1.76 -DBOOSTROOT=/opt/local/libexec/boost/1.76 -DBOOST_INCLUDEDIR=/opt/local/libexec/boost/1.76/include -DBOOST_LIBRARYDIR=/opt/local/libexec/boost/1.76/lib -DBOOST_INCLUDE_DIR=/opt/local/libexec/boost/1.76/include -DBOOST_LIBRARY_DIR=/opt/local/libexec/boost/1.76/lib -DBOOST_LIB_DIR=/opt/local/libexec/boost/1.76/lib -DBoost_NO_SYSTEM_PATHS=ON -DBoost_INCLUDE_DIR=/opt/local/libexec/boost/1.76/include -DBoost_DIR=/opt/local/libexec/boost/1.76 -DCMAKE_OSX_ARCHITECTURES="ppc" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.4" -DCMAKE_OSX_SYSROOT="/" /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_graphics_poppler/poppler/work/poppler-24.01.0 
Exit code: 1
Error: Failed to configure poppler: consult /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_graphics_poppler/poppler/work/build/CMakeFiles/CMakeError.log
Error: Failed to configure poppler: configure failure: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_graphics_poppler/poppler/main.log for details.

Gpgmepp is something new to me that I am just citing, gpgme @1.20.0_0 (active) requested_variants='' platform='darwin 8' archs='ppc' date='2023-05-25T00:50:02+0200' is installed.

In the mentioned CMakeError.log this can be found:

Performing C++ SOURCE FILE Test GCC_HAS_AS_NEEDED failed with the following output:
Change Dir: /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_graphics_poppler/poppler/work/build/CMakeFiles/CMakeTmp

Run Build Command(s):/opt/local/bin/gmake -f Makefile cmTC_93b59/fast && /opt/local/bin/gmake  -f CMakeFiles/cmTC_93b59.dir/build.make CMakeFiles/cmTC_93b59.dir/build
gmake[1]: Entering directory '/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_graphics_poppler/poppler/work/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_93b59.dir/src.cxx.o
/opt/local/bin/g++-mp-7 -DGCC_HAS_AS_NEEDED  -fno-exceptions -fno-check-new -fno-common -fno-operator-names -D_DEFAULT_SOURCE  -arch ppc -mmacosx-version-min=10.4 -o CMakeFiles/cmTC_93b59.dir/src.cxx.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_graphics_poppler/poppler/work/build/CMakeFiles/CMakeTmp/src.cxx
Linking CXX executable cmTC_93b59
/opt/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_93b59.dir/link.txt --verbose=1
/opt/local/bin/g++-mp-7 -fno-exceptions -fno-check-new -fno-common -fno-operator-names -D_DEFAULT_SOURCE  -arch ppc -mmacosx-version-min=10.4 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/local/libexec/boost/1.76/lib -Wl,-headerpad_max_install_names -liconv -L/opt/local/lib -lMacportsLegacySupport  CMakeFiles/cmTC_93b59.dir/src.cxx.o -o cmTC_93b59  -Wl,--as-needed 
ld: unknown option: --as-needed
collect2: error: ld returned 1 exit status
gmake[1]: *** [CMakeFiles/cmTC_93b59.dir/build.make:99: cmTC_93b59] Error 1
gmake[1]: Leaving directory '/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_graphics_poppler/poppler/work/build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:127: cmTC_93b59/fast] Error 2


Source file was:
int main() { return 0; }

I cannot see any correlation to the output from configuration phase…

I'll attach a few files for the interested and leave the "build" intact!

Attachments (3)

main.log (26.2 KB) - added by ballapete (Peter "Pete" Dyballa) 9 months ago.
Main.log from PPC Tiger, Mac OS X 10.4.11
CMakeError.log (2.0 KB) - added by ballapete (Peter "Pete" Dyballa) 9 months ago.
work/build/CMakeFiles/CMakeError.log from PPC Tiger, Mac OS X 10.4.11
CMakeOutput.log (48.7 KB) - added by ballapete (Peter "Pete" Dyballa) 9 months ago.
work/build/CMakeFiles/CMakeOutput.log from PPC Tiger, Mac OS X 10.4.11

Download all attachments as: .zip

Change History (5)

Changed 9 months ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

Main.log from PPC Tiger, Mac OS X 10.4.11

Changed 9 months ago by ballapete (Peter "Pete" Dyballa)

Attachment: CMakeError.log added

work/build/CMakeFiles/CMakeError.log from PPC Tiger, Mac OS X 10.4.11

Changed 9 months ago by ballapete (Peter "Pete" Dyballa)

Attachment: CMakeOutput.log added

work/build/CMakeFiles/CMakeOutput.log from PPC Tiger, Mac OS X 10.4.11

comment:1 in reply to:  description ; Changed 9 months ago by ryandesign (Ryan Carsten Schmidt)

Cc: mascguy added; mascguy@… removed
Resolution: duplicate
Status: newclosed

Replying to ballapete:

The build starts with configure phase when one patch set is removed, see #67266. This phase ends here:

CMake Error at CMakeLists.txt:162 (MESSAGE):
  Could not find the 1.19 version of Gpgmepp.  If you're not interested in
  the features it provides set the cmake ENABLE_GPGME option to OFF
Call Stack (most recent call first):
  CMakeLists.txt:168 (find_soft_mandatory_package)


-- Configuring incomplete, errors occurred!
See also "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_graphics_poppler/poppler/work/build/CMakeFiles/CMakeOutput.log".
See also "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_graphics_poppler/poppler/work/build/CMakeFiles/CMakeError.log".
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_graphics_poppler/poppler/work/build" && /opt/local/bin/cmake -G "CodeBlocks - Unix Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX="/opt/local" -DCMAKE_INSTALL_NAME_DIR="/opt/local/lib" -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/usr" -DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_OBJC_COMPILER="$CC" -DCMAKE_OBJCXX_COMPILER="$CXX" -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_POLICY_DEFAULT_CMP0060=NEW -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_MAKE_PROGRAM=/opt/local/bin/gmake -DCMAKE_MODULE_PATH="/opt/local/share/cmake/Modules" -DCMAKE_PREFIX_PATH="/opt/local/share/cmake/Modules" -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON -DCMAKE_INSTALL_RPATH="/opt/local/lib" -Wno-dev -DBUILD_CPP_TESTS=OFF -DBUILD_GTK_TESTS=OFF -DBUILD_MANUAL_TESTS=OFF -DBUILD_QT5_TESTS=OFF -DBUILD_QT6_TESTS=OFF -DENABLE_BOOST=ON -DENABLE_QT5=OFF -DENABLE_QT6=OFF -DENABLE_UNSTABLE_API_ABI_HEADERS=ON -DGLIB2_MKENUMS_PYTHON=/opt/local/bin/python3.11 -DRUN_GPERF_IF_PRESENT=OFF -DWITH_NSS3=ON -DENABLE_GOBJECT_INTROSPECTION=ON -DBOOST_ROOT=/opt/local/libexec/boost/1.76 -DBOOSTROOT=/opt/local/libexec/boost/1.76 -DBOOST_INCLUDEDIR=/opt/local/libexec/boost/1.76/include -DBOOST_LIBRARYDIR=/opt/local/libexec/boost/1.76/lib -DBOOST_INCLUDE_DIR=/opt/local/libexec/boost/1.76/include -DBOOST_LIBRARY_DIR=/opt/local/libexec/boost/1.76/lib -DBOOST_LIB_DIR=/opt/local/libexec/boost/1.76/lib -DBoost_NO_SYSTEM_PATHS=ON -DBoost_INCLUDE_DIR=/opt/local/libexec/boost/1.76/include -DBoost_DIR=/opt/local/libexec/boost/1.76 -DCMAKE_OSX_ARCHITECTURES="ppc" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.4" -DCMAKE_OSX_SYSROOT="/" /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_graphics_poppler/poppler/work/poppler-24.01.0 
Exit code: 1
Error: Failed to configure poppler: consult /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_graphics_poppler/poppler/work/build/CMakeFiles/CMakeError.log
Error: Failed to configure poppler: configure failure: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_graphics_poppler/poppler/main.log for details.

Gpgmepp is something new to me that I am just citing, gpgme @1.20.0_0 (active) requested_variants='' platform='darwin 8' archs='ppc' date='2023-05-25T00:50:02+0200' is installed.

Duplicate of #68423.

In the mentioned CMakeError.log this can be found:

Performing C++ SOURCE FILE Test GCC_HAS_AS_NEEDED failed with the following output:
Change Dir: /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_graphics_poppler/poppler/work/build/CMakeFiles/CMakeTmp

Run Build Command(s):/opt/local/bin/gmake -f Makefile cmTC_93b59/fast && /opt/local/bin/gmake  -f CMakeFiles/cmTC_93b59.dir/build.make CMakeFiles/cmTC_93b59.dir/build
gmake[1]: Entering directory '/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_graphics_poppler/poppler/work/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_93b59.dir/src.cxx.o
/opt/local/bin/g++-mp-7 -DGCC_HAS_AS_NEEDED  -fno-exceptions -fno-check-new -fno-common -fno-operator-names -D_DEFAULT_SOURCE  -arch ppc -mmacosx-version-min=10.4 -o CMakeFiles/cmTC_93b59.dir/src.cxx.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_graphics_poppler/poppler/work/build/CMakeFiles/CMakeTmp/src.cxx
Linking CXX executable cmTC_93b59
/opt/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_93b59.dir/link.txt --verbose=1
/opt/local/bin/g++-mp-7 -fno-exceptions -fno-check-new -fno-common -fno-operator-names -D_DEFAULT_SOURCE  -arch ppc -mmacosx-version-min=10.4 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/local/libexec/boost/1.76/lib -Wl,-headerpad_max_install_names -liconv -L/opt/local/lib -lMacportsLegacySupport  CMakeFiles/cmTC_93b59.dir/src.cxx.o -o cmTC_93b59  -Wl,--as-needed 
ld: unknown option: --as-needed
collect2: error: ld returned 1 exit status
gmake[1]: *** [CMakeFiles/cmTC_93b59.dir/build.make:99: cmTC_93b59] Error 1
gmake[1]: Leaving directory '/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_graphics_poppler/poppler/work/build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:127: cmTC_93b59/fast] Error 2


Source file was:
int main() { return 0; }

Not a bug; behaving correctly. As you see, this test is called GCC_HAS_AS_NEEDED. The main.log says:

:info:configure -- Performing Test GCC_HAS_AS_NEEDED
:info:configure -- Performing Test GCC_HAS_AS_NEEDED - Failed

So cmake has correctly determined that your compiler does not support the --as-needed flag.

comment:2 in reply to:  1 Changed 9 months ago by ballapete (Peter "Pete" Dyballa)

Replying to ryandesign:

Not a bug; behaving correctly. As you see, this test is called GCC_HAS_AS_NEEDED. The main.log says:

:info:configure -- Performing Test GCC_HAS_AS_NEEDED
:info:configure -- Performing Test GCC_HAS_AS_NEEDED - Failed

So cmake has correctly determined that your compiler does not support the --as-needed flag.

And so it seems that for poppler @24.x a compiler, or rather linkage editor is needed that understands --as-needed? Otherwise there is no sense in interrupting the configuration phase.

Note: See TracTickets for help on using tickets.