Opened 2 weeks ago

Last modified 2 weeks ago

#69737 assigned defect

ld: symbol(s) not found for architecture x86_64 in libX11.a @1.8.8_0+universal

Reported by: marcoferraris Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: mbrethen, hapaguy (Brian Kurt Fujikawa)
Port: xorg-libX11

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Hi,

compiling csl-reduce on a MacBook Air M1, with macOS Sonoma 14.4.1 (23E224) and macports xorg-libX11 @1.8.8_0+universal, everything works fine.

On the contrary, while trying to compile csl-reduce on an X86_64 MacBook Pro, with macOS Big Sur v11.7.10 (20G1427) and macports xorg-libX11 @1.8.8_0+universal, compilation fails with the following list of errors:

Relinking csl because of csl-arith01.o csl-arith02.o csl-arith03.o csl-arith04.o csl-arith05.o csl-arith06.o csl-arith07.o csl-arith08.o csl-arith09.o csl-arith10.o csl-arith11.o csl-arith12.o csl-arith13.o csl-arith14.o csl-arith-quad.o csl-isprime.o csl-char.o csl-cslmpi.o csl-eval1.o csl-eval2.o csl-eval3.o csl-eval4.o csl-fns1.o csl-fns2.o csl-fns3.o csl-inthash.o csl-print.o csl-cslread.o csl-restart.o csl-lisphash.o csl-serialize.o csl-sysfwin.o csl-winsupport.o csl-csl.o csl-fasl.o csl-preserve.o csl-bytes1.o csl-showhdr.o csl-float128_t.o csl-newcslgc.o csl-newallocate.o csl-stubs.o reduce.fonts/cmr10.pfb ../lib/libcrlibm.a ../include/crlibm.h ../lib/libffi.a ../include/ffi.h ../lib/libsoftfloat.a ../include/softfloat.h ../lib/libFOX-1.6.a /Users/me/sw/reduce-algebra/trunk/csl/cslbase/lvector.h /Users/me/sw/reduce-algebra/trunk/csl/cslbase/threadloc.h
MACOSX_DEPLOYMENT_TARGET=11.0 /Users/me/sw/reduce-algebra/trunk/cslbuild/x86_64-mac_11_big_sur-darwin20.6.0/cachecxx.sh -std=gnu++11 -std=gnu++11 -std=gnu++20  -mmacosx-version-min=11.0 -fconstexpr-steps=32000000 -I/opt/local/include/freetype2  -O3 -Wall  -L../lib  -L/opt/local/lib -mmacosx-version-min=11.0 -framework Carbon -framework CoreServices -framework CoreFoundation -framework ApplicationServices -o csl csl-arith01.o csl-arith02.o csl-arith03.o csl-arith04.o csl-arith05.o csl-arith06.o csl-arith07.o csl-arith08.o csl-arith09.o csl-arith10.o csl-arith11.o csl-arith12.o csl-arith13.o csl-arith14.o csl-arith-quad.o csl-isprime.o csl-char.o csl-cslmpi.o csl-eval1.o csl-eval2.o csl-eval3.o csl-eval4.o csl-fns1.o csl-fns2.o csl-fns3.o csl-inthash.o csl-print.o csl-cslread.o csl-restart.o csl-lisphash.o csl-serialize.o csl-sysfwin.o csl-winsupport.o csl-csl.o csl-fasl.o csl-preserve.o csl-bytes1.o csl-showhdr.o csl-float128_t.o csl-newcslgc.o csl-newallocate.o   csl-stubs.o -lFOX-1.6 ../lib/libcrlibm.a ../lib/libffi.a ../lib/libsoftfloat.a  /opt/local/lib/libXrandr.a       /opt/local/lib/libXcursor.a       /opt/local/lib/libXrender.a       /opt/local/lib/libcurses.a       /opt/local/lib/libXext.a       /opt/local/lib/libX11.a       /opt/local/lib/libXft.a       /opt/local/lib/libXau.a       /opt/local/lib/libXfixes.a       /opt/local/lib/libxcb.a       /opt/local/lib/libXdmcp.a       /opt/local/lib/libpng.a       /opt/local/lib/libz.a       /opt/local/lib/libbz2.a       /opt/local/lib/libfreetype.a       /opt/local/lib/libiconv.a       /opt/local/lib/libXft.a       /opt/local/lib/libfontconfig.a       /opt/local/lib/libintl.a       /opt/local/lib/libexpat.a       /opt/local/lib/libbrotlicommon.a /opt/local/lib/libbrotlidec.a       -lpthread       -ldl 
Undefined symbols for architecture x86_64:
  "__XErrorFunction", referenced from:
      _XSetErrorHandler in libX11.a(ErrHndlr.o)
      __XError in libX11.a(XlibInt.o)
      _XOpenDisplay in libX11.a(OpenDis.o)
  "__XIOErrorFunction", referenced from:
      _XSetIOErrorHandler in libX11.a(ErrHndlr.o)
      __XIOError in libX11.a(XlibInt.o)
      _XOpenDisplay in libX11.a(OpenDis.o)
  "__Xdebug", referenced from:
      FX::windowed_worker(int, char const**, int (*)(int, char const**)) in libFOX-1.6.a(FXWorker.o)
      _XOpenDisplay in libX11.a(OpenDis.o)
ld: symbol(s) not found for architecture x86_64
clang: [0;1;31merror: [0m[1mlinker command failed with exit code 1 (use -v to see invocation)[0m

With libX11.a @1.8.7_0+universal, and previous versions, I've never seen such errors.

Oddly enough, these symbols are not reported as undefined symbols for architecture x86_64 in libX11.a @1.8.8_0+universal while compiling the universal version of CSL-Reduce on the MacBook Air M1.

Is it possible to fix the problem?

Best Regards, Marco Ferraris

Change History (5)

comment:1 Changed 2 weeks ago by ryandesign (Ryan Carsten Schmidt)

Cc: mbrethen added
Description: modified (diff)
Owner: set to jeremyhu
Port: xorg-libX11 added
Status: newassigned

If I understand correctly, you are compiling csl-reduce manually using MacPorts dependencies? We do have a reduce port which you could install instead.

comment:2 Changed 2 weeks ago by marcoferraris

Yes you understood correctly.

I know that in macports there is a reduce @20211019_0 port: it is a r6110 PSL-reduce application.

I already installed it and the port compiled also under Sonoma 14.4.1 (arm64). However, on my MacBook M1 it doesn't run because reduce-algebra maintainers did not port the bpsl code to the arm64 architecture. In my MacBook M1 the application 'bpsl' is missing.

Since the 'reduce @20211019_0' port is quite old, I prefer to work with the latest version available and, if I want to run it natively on my MacBook M1, I have to use CSL-reduce.

The problem with compiling CSL-reduce is that it uses the libFOX-1.6.a library, which in turn needs the libX11.a library. With the xorg-libX11 @1.8.7+universal port (and previous versions) installed there is no problem both in X86_64 and arm64 architectures. Last week I updated to xorg-libX11 @1.8.8+universal and compiling CSL-reduce consistently failed on my X86_64 Macs because the libFOX-1.6.a library was missing. No problem on the MacBook Air M1.

Restoring, from a Time Machine backup, macports to a previous version containing the xorg-libX11 @1.8.7+universal port on my X86_64 Macs solved the problem (temporarily).

Last edited 2 weeks ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:3 in reply to:  2 Changed 2 weeks ago by ryandesign (Ryan Carsten Schmidt)

Replying to marcoferraris:

I know that in macports there is a reduce @20211019_0 port: it is a r6110 PSL-reduce application.

I already installed it and the port compiled also under Sonoma 14.4.1 (arm64). However, on my MacBook M1 it doesn't run because reduce-algebra maintainers did not port the bpsl code to the arm64 architecture. In my MacBook M1 the application 'bpsl' is missing.

I had read the reduce Portfile and it looks like it includes both psl and csl. However, looking at the number of files in each OS/arch archive, I see that the arm64 builds have only a fraction of the number of files included in the x86_64 builds, for I suppose the reason you mentioned. Maybe that has improved in more recent versions?

Since the 'reduce @20211019_0' port is quite old, I prefer to work with the latest version available and, if I want to run it natively on my MacBook M1, I have to use CSL-reduce.

Ok, so Mark should update the reduce port to a newer version. That was also mentioned in comment:ticket:68639:9. Mark, you haven't responded to that ticket yet. Are you working on this update and the other issues raised in that ticket?

comment:4 Changed 2 weeks ago by marcoferraris

In any case, this ticket should be treated as a ticket regarding the xorg-libX11 @1.8.8+universal port and not as a reduce port ticket.

Of course, any update of the reduce port would be welcome. Please take into account my report on X86_64 problems with xorg-libX11 @1.8.8+universal.

comment:5 Changed 2 weeks ago by hapaguy (Brian Kurt Fujikawa)

Cc: hapaguy added
Note: See TracTickets for help on using tickets.