Opened 2 weeks ago
Closed 4 days ago
#71156 closed defect (duplicate)
gdal @3.9.3: requests rasterlite support but doesn't declare dependency on librasterlite2; opportunistically finds Rasterlite2.framework
Reported by: | Junjie-oss | Owned by: | Veence (Vincent) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | nilason (Nicklas Larsson), Dave-Allured (Dave Allured) | |
Port: | gdal |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
---> Fetching archive for gdal ---> Attempting to fetch gdal-3.9.3_0+postgresql16+proj9.darwin_24.arm64.tbz2 from https://mirror.sjtu.edu.cn/macports/packages/gdal ---> Attempting to fetch gdal-3.9.3_0+postgresql16+proj9.darwin_24.arm64.tbz2 from https://pek.cn.packages.macports.org/macports/packages/gdal ---> Attempting to fetch gdal-3.9.3_0+postgresql16+proj9.darwin_24.arm64.tbz2 from https://packages.macports.org/gdal ---> Building gdal Error: Failed to build gdal: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_gdal/gdal/main.log for details. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug. Error: Processing of port saga failed
main.log:
:info:build ld: symbol(s) not found for architecture arm64 :info:build clang++: error: linker command failed with exit code 1 (use -v to see invocation) :info:build make[2]: *** [libgdal.35.3.9.3.dylib] 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_gis_gdal/gdal/work/build' :info:build make[1]: *** [CMakeFiles/GDAL.dir/all] Error 2 :info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_gdal/gdal/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_gis_gdal/gdal/work/build' :info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_gdal/gdal/work/build" && /usr/bin/make -j10 -w VERBOSE=ON :info:build Exit code: 2 :error:build Failed to build gdal: command execution failed :debug:build Error code: CHILDSTATUS 67952 2 :debug:build Backtrace: command execution failed :debug:build while executing :debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring" :debug:build invoked from within :debug:build "command_exec -callback portprogress::target_progress_callback build" :debug:build (procedure "portbuild::build_main" line 10) :debug:build invoked from within :debug:build "$procedure $targetname" :error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_gdal/gdal/main.log for details.
Attachments (1)
Change History (14)
comment:1 Changed 2 weeks ago by Junjie-oss
Description: | modified (diff) |
---|
comment:2 Changed 2 weeks ago by ryandesign (Ryan Carsten Schmidt)
Cc: | nilason added |
---|---|
Description: | modified (diff) |
Owner: | set to Veence |
Priority: | High → Normal |
Status: | new → assigned |
comment:3 Changed 2 weeks ago by Dave-Allured (Dave Allured)
Cc: | Dave-Allured added |
---|
comment:4 Changed 7 days ago by ryandesign (Ryan Carsten Schmidt)
According to https://ports.macports.org/port/gdal/details/ we have successful builds of this port on all macOS versions 10.7 and later, so we need your log file to investigate what went wrong on your system. If you won't provide it, we'll have to close this ticket as unreproducible.
Changed 6 days ago by Junjie-oss
Attachment: | main.log.zip added |
---|
comment:6 Changed 6 days ago by Dave-Allured (Dave Allured)
Thank you for the log file. Macos 15.1, ARM system.
It looks like the rasterlite driver is enabled for over a year, but librasterlite2
is not included in the listed dependencies. I do not understand how this port could have possibly worked on any system, since then. Perhaps a different port had provided rasterlite
symbols, until now.
If you don't mind hacking the local gdal Portfile, try changing -DGDAL_ENABLE_DRIVER_RASTERLITE=ON
to OFF
. Then port clean gdal
, port install gdal
. Let us know what happens.
comment:7 Changed 6 days ago by ryandesign (Ryan Carsten Schmidt)
The log says:
:info:build ld: warning: ignoring file '/Library/Frameworks/Rasterlite2.framework/Versions/1A/Rasterlite2': found architecture 'x86_64', required architecture 'arm64'
See wiki:FAQ#libraryframeworks
Remove /Library/Frameworks/Rasterlite2.framework, run sudo port clean gdal
, and then try again.
comment:8 Changed 5 days ago by Dave-Allured (Dave Allured)
I agree with Ryan's advice. Changing -DGDAL_ENABLE_DRIVER_RASTERLITE=ON
to OFF
might also work temporarily, but Ryan's advice is the correct and permanent solution.
comment:9 Changed 5 days ago by ryandesign (Ryan Carsten Schmidt)
Dave, you're right too though. gdal does request rasterlite support to be enabled with -DGDAL_ENABLE_DRIVER_RASTERLITE=ON
, yet it doesn't declare a dependency on the librasterlite2 port; as far as I can tell from the git history, no port does or ever has. So on most people's systems, rasterlite support isn't actually getting enabled. From a recent buildbot build log:
-- Could NOT find RASTERLITE2 (missing: RASTERLITE2_LIBRARY RASTERLITE2_INCLUDE_DIR) (Required is at least version "1.1.0")
Seems like gdal needs to either declare the dependency or set -DGDAL_ENABLE_DRIVER_RASTERLITE=OFF
as you suggested; either way, a revbump is needed.
If the solution chosen is to add the librasterlite2 dependency, then it is still possible, depending on how cmake works, that /Library/Frameworks/Rasterlite2.framework might still be chosen first and could thus still interfere and would need to be removed.
comment:10 Changed 5 days ago by ryandesign (Ryan Carsten Schmidt)
Summary: | install gdal failed → gdal @3.9.3: requests rasterlite support but doesn't declare dependency on librasterlite2; opportunistically finds Rasterlite2.framework |
---|
comment:11 Changed 5 days ago by Dave-Allured (Dave Allured)
Looks like a duplicate of #68655. The frameworks error message is different, but the root cause is the same.
comment:12 Changed 4 days ago by Dave-Allured (Dave Allured)
Reporter sent e-mail "Thanks a lot. Gdal has been installed successfully." Please close this ticket.
comment:13 Changed 4 days ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → duplicate |
---|---|
Status: | assigned → closed |
Please attach (not paste) the full main.log file. The last portion of the main.log you posted is not sufficient to identify the problem.