Opened 2 months ago

Last modified 2 months ago

#63251 assigned defect

GILDAS build fail on Big Sur / arm64

Reported by: rampante Owned by: bardeau
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: gildas

Description (last modified by ryandesign (Ryan Schmidt))

I've been trying to install gildas on macOS Big Sur 11.4 (Xcode version 12.5, M1 chip) without success:

  • at first I got a "ld: framework not found CoreFoundation" error. Following this ticket, I reinstalled gcc11 and python38 from source
  • now, on the other hand, this warning appears:
    -->  Found 3 broken files, matching files to ports
    --->  Found 1 broken port, determining rebuild order
    You can always run 'port rev-upgrade' again to fix errors.
    The following ports will be rebuilt: gildas @202107a+gcc11
    

and, after a few of attempts, the build is still broken. Running port -d -y rev-upgrade yields the following output.

Attachments (1)

error.log (167.2 KB) - added by rampante 2 months ago.

Download all attachments as: .zip

Change History (8)

Changed 2 months ago by rampante

Attachment: error.log added

comment:1 Changed 2 months ago by jmroot (Joshua Root)

Owner: set to bardeau
Port: gildas added
Status: newassigned

comment:2 Changed 2 months ago by bardeau

Hi,

the error for the "3 broken files" was fixed by https://github.com/macports/macports-ports/pull/11535 a few days ago.

However, another error is raised by MacPorts:

--->  No broken files found.
gildas is using libstdc++ (this installation is configured to use libc++)
--->  Found 1 broken port, determining rebuild order
DEBUG: Broken: gildas
DEBUG: Processing port gildas @0:202107a_1+gcc11
You can always run 'port rev-upgrade' again to fix errors.
The following ports will be rebuilt: gildas @202107a+gcc11
Continue? [Y/n]:

I assume that the statement "gildas is using libstdc++ (this installation is configured to use libc++)" is the reason for declaring gildas as broken.

During the compilation on my local machine, the C++ sources are indeed compiled by g++ (MacPorts gcc11 11.1.0_2) 11.1.0. Why does MacPorts says "this installation is configured to use libc++"? What should be done to avoid this error?

This looks very similar this ticket 56554.

comment:3 Changed 2 months ago by ryandesign (Ryan Schmidt)

Description: modified (diff)

Why does MacPorts says "this installation is configured to use libc++"?

Because MacPorts installations on Mac OS X 10.6 and later are configured by default to use libc++. The setting is cxx_stdlib. It can be changed in macports.conf. The setting does not appear in the default macports.conf because it is not really intended to be changed, and if you change it you must uninstall and reinstall all C++-using ports.

What should be done to avoid this error?

The port should not compile C++ software using g++. If that cannot be avoided, and if the port does not use any C++ libraries installed by another port, and if the port does not install any C++ libraries that are to be used by other ports, then the port can suppress the warning by setting (IIRC) configure.cxx_stdlib macports-libstdc++.

comment:4 Changed 2 months ago by bardeau

@ryandesign thank you for the detailed explanation. I have prepared a fix to use clang++ instead of g++. I confirm this fixes the build error.

@rampante the fix is ready in the Gildas sources. I need to gather a few other things, and I will submit the Portfile retrieving the proper sources in a few days from now. I will close this ticket at that moment.

comment:5 Changed 2 months ago by rampante

Thanks, I'll wait for it then.

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

Replying to bardeau:

@ryandesign thank you for the detailed explanation. I have prepared a fix to use clang++ instead of g++. I confirm this fixes the build error.

According to recent build logs like this one clang++ is already being used.

comment:7 in reply to:  6 Changed 2 months ago by bardeau

Replying to ryandesign:

According to recent build logs like this one clang++ is already being used.

Our build script is able to select automatically between clang++ and g++. When both are available, as for the user here, g++ was preferred. The fix in preparation will change this. If the the automatic builds are done with clang++, this most likely means that g++ is not available for those.

Note: See TracTickets for help on using tickets.