Opened 6 years ago

Closed 5 years ago

#57061 closed defect (wontfix)

glib2 @2.56.2: won't build +universal if libgcc7 installed. Error is: "No iconv() implementation found in C library or libiconv"

Reported by: kencu (Ken) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: tiger leopard Cc:
Port: glib2

Description (last modified by kencu (Ken))

This is a niche situation, admittedly, disappearing from MacPorts.

building glib2 +universal fails on Tiger (and presumably Leopard) if libgcc7 is installed and active.

configuration of glib2 fails when it tries to find a compatible iconv_open to use. It finds /opt/local/lib/libstdc++.6.dylib installed by libgcc7 which is only built in the host architecture, and errors out.

However, if libgcc7 is deactivated, then configure finds /usr/lib/libstdc++.6.dylib instead, which is multiarchitecture and fat, and the universal build succeeds without issue.

I'm not sure if glib2 can be set up to find /usr/lib/libstdc++.6.dylib preferentially. In the meantime, deactivating libgcc7, upgrading glib2, and then reactivating libgcc7 is a fairly trivial workaround.

Attachments (2)

glib2-universal-main.log (74.2 KB) - added by kencu (Ken) 6 years ago.
glib2-universal-config.log (41.7 KB) - added by kencu (Ken) 6 years ago.

Download all attachments as: .zip

Change History (7)

Changed 6 years ago by kencu (Ken)

Attachment: glib2-universal-main.log added

Changed 6 years ago by kencu (Ken)

Attachment: glib2-universal-config.log added

comment:1 Changed 6 years ago by kencu (Ken)

Description: modified (diff)

comment:2 Changed 6 years ago by kencu (Ken)

This is happening with more ports now. I know the libgcc* ports just were reworked, and I wonder if it might have something to do with that.

In the libgcc7 port, we have this:

        if { ${isLastSupported} } {
            # For binary compatibility with binaries that linked against the old libstdcxx port
            ln -s libgcc/libstdc++.6.dylib ${destroot}${prefix}/lib/libstdc++.6.dylib
        } else {

and it's this symlink that seems to be causing the issue. I have a feeling that the "old libstdcxx" port is long gone out of interest now, and perhaps I can delete this symlink and everything will work properly. This symlink has been in the libgcc ports for a long time, though -- not sure why I'm just seeing this lately.

comment:3 Changed 5 years ago by kencu (Ken)

Summary: glib2 @2.56.2: won't build +universal if libgcc7 installedglib2 @2.56.2: won't build +universal if libgcc7 installed. Error is: "No iconv() implementation found in C library or libiconv"

comment:4 Changed 5 years ago by kencu (Ken)

Again this shows up on the last update. I have deleted the symlink

${prefix}/lib/libstdc++.6.dylib

and will see if there are any issues that show up doing that over time. It does fix the libiconv() error, and glib2 builds.

comment:5 Changed 5 years ago by kencu (Ken)

Resolution: wontfix
Status: assignedclosed

this is a longstanding known issue with iconv that has nothing to do with glib2 and has many other open (and closed) tickets to indicate this is not an issue that will be / or needs to be / fixed.

Note: See TracTickets for help on using tickets.