Opened 7 months ago

Closed 7 months ago

#69785 closed defect (invalid)

libarchive @3.7.3: :info:configure configure: error: cannot compute sizeof (wchar_t) on systems building with gcc

Reported by: kencu (Ken) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: tiger leopard legacy Cc:
Port: libarchive, icu

Description

build fails on 10.5 PPC:

:info:configure checking whether EILSEQ is declared... yes
:info:configure checking for wchar_t... yes
:info:configure checking size of wchar_t... configure: error: in `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_archivers_libarchive/libarchive/work/libarchive-3.7.3':
:info:configure configure: error: cannot compute sizeof (wchar_t)
:info:configure See `config.log' for more details

the cause, however, has to do with the fact the icu has been built againt the newer libstdc++ from gcc7, and so that version of icu also must link against the newer libstdc++:

dyld: Symbol not found: __ZSt14__once_functor
  Referenced from: /opt/local/lib/libicuuc.74.dylib
  Expected in: /usr/lib/libstdc++.6.dylib

./configure: line 1941: 57107 Trace/BPT trap          ./conftest$ac_exeext

so the fix is to make libarchive also build with the newer gcc compiler in some way (any way, but setting the compiler.c_standard to 2011 does it).

So now anything that links in icu has to be built with the newer gcc compiler.

Attachments (2)

libarchive-fail-10.5-PPC.log (25.6 KB) - added by kencu (Ken) 7 months ago.
libarchive.config.log (313.8 KB) - added by kencu (Ken) 7 months ago.

Download all attachments as: .zip

Change History (4)

Changed 7 months ago by kencu (Ken)

Changed 7 months ago by kencu (Ken)

Attachment: libarchive.config.log added

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

What does otool -L /opt/local/lib/libicuuc.74.dylib look like? Is it actually linked with /usr/lib/libstdc++.6.dylib or is dyld looking for symbols there at runtime despite it not being linked?

comment:2 Changed 7 months ago by kencu (Ken)

Resolution: invalid
Status: newclosed
$ otool -L /opt/local/lib/libicuuc.74.dylib
/opt/local/lib/libicuuc.74.dylib:
	/opt/local/lib/libicuuc.74.dylib (compatibility version 74.0.0, current version 74.2.0)
	/opt/local/lib/libicudata.74.dylib (compatibility version 74.0.0, current version 74.2.0)
	/opt/local/lib/libgcc/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.24.0)
	/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/opt/local/lib/libgcc/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.7)

I think I must have done this myself.

icu has a lib dep on libgcc and by extension lilbgcc7. I must have force-deactivated that when I was testing newer gcc/libgcc builds.

I just rebuilt libarchive without modifying the compiler choice, and all seems fine.

Looks like pilot error here.

Note: See TracTickets for help on using tickets.