#67596 closed defect (fixed)

gdal @3.7.0: opportunistic use of pcre2

Reported by: news24lor Owned by: Veence (Vincent)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc: nilason (Nicklas Larsson)
Port: gdal

Description

Hi

I've build gdal on Apple Silicon computer and it run in basic install.

I want support for netcdf file but it is impossible to build GDAL with netcdf support. It goes to crash and at the last I have this error:

:info:build ld: warning: ignoring file /opt/local/lib/libpcre2-8.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
:info:build Undefined symbols for architecture x86_64:
....

Is this a bug or some libraries are impossible to build for different processor?

GDAL's performance with Apple Silicon processors is really fantastic

Thanks

Lorenzo

Attachments (1)

main.log (517.0 KB) - added by news24lor 11 months ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 11 months ago by ryandesign (Ryan Carsten Schmidt)

Owner: set to Veence
Status: newassigned
Summary: Impossible to build GDAL with netcdfgdal @3.7.0: opportunistic use of pcre2
Version: 2.8.1

It's not a crash; it's a build failure. Looks like whatever port is building at the time of this error (maybe gdal, maybe one of its dependencies) cannot be built for arm64 and is therefore building for x86_64. That may be fine (or you may have requested the universal variant) but it also apparently can optionally use pcre2, but we didn't know that, so pcre2 is not declared as a dependency of that port. pcre2 is installed for arm64 on your computer, but in order to support building this port for x86_64, pcre2 will need to be installed universal—for both arm64 and x86_64. MacPorts would take care of that automatically if pcre2 were listed as a dependency. So please attach the main.log file so we can confirm which port needs that change made. (A similar problem happened with gdal and libheif some time ago.)

Changed 11 months ago by news24lor

Attachment: main.log added

comment:2 Changed 11 months ago by news24lor

Hi Ryan

Here my log from build of GDAL with netcdf

comment:3 Changed 11 months ago by Veence (Vincent)

I’m going to look after that in a few days. Unfortunately, I've been foolish enough to update to the new MacOS 14 beta, expecting that the upgrading process would give me the choice of installing on another partition, which it did not. Upshot of all this: I have to rebuild my whole set of ports before being operational again…

comment:4 Changed 11 months ago by news24lor

Hi Veence

Don't worry. OS Beta is always "dangerous".
Thanks for the big work on the code.

The best thing is that the most important open source libraries are already on ARM processor in MacPorts.

I have some interesting results with QGIS on ARM from MacPorts versus Rosetta version and Intel version. I have used a my big project in Python with about 100 QGIS algorithms. The jump of performance is real. In the next days I'll post the results.

QGIS is compiled with GRASS (ARM processor) and SAGA (ARM processor). All binaries are compiled in the new processor.

GDAL is almost complete but I have to add the netcdf, hdf, mrsid and ecw libraries. After this one, QGIS will be complete.

Thanks again

Lorenzo

comment:5 Changed 11 months ago by Veence (Vincent)

Ciao Lorenzo. I've been having a full-native ARM version of QGis for a long time (since before that extended break). I’m not sure what does work with the current MacPorts version. But I’ll investigate. Grazie della tua pazienza. Vincent

comment:6 in reply to:  2 Changed 11 months ago by ryandesign (Ryan Carsten Schmidt)

Replying to news24lor:

Here my log from build of GDAL with netcdf

Thanks, that does confirm it's really the gdal port having the problem.

The lines in the log that say "Skipping completed" tell us this was not a clean build attempt, which could be the source of the problem, and which at least means that we cannot see in the log the output of the configure phase; I had hoped to see from the configure phase some indication that pcre2 had been searched for and found. Please sudo port clean gdal and try again and if it fails again attach the new main.log file.

comment:7 Changed 11 months ago by nilason (Nicklas Larsson)

comment:8 Changed 11 months ago by nilason (Nicklas Larsson)

Cc: nilason added

comment:9 Changed 11 months ago by news24lor

Hi Ryan

Now it works. I have installed netcdf driver in GDAL.

Very good!

Many thanks

Lorenzo

comment:10 Changed 11 months ago by nilason (Nicklas Larsson)

Resolution: fixed
Status: assignedclosed

In 3a32f3e15d867f43f5556f4ed47ca149208671d7/macports-ports (master):

gdal: add pcre2 dependency

Closes: #67596

Note: See TracTickets for help on using tickets.