Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#64067 closed defect (fixed)

tkimg @1.4.13_0: Undefined symbols for architecture arm64

Reported by: chrstphrchvz (Christopher Chavez) Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: Cc:
Port: tkimg

Description

https://build.macports.org/builders/ports-12_arm64-builder/builds/29906/steps/install-port/logs/stdio

/usr/bin/clang -dynamiclib -pipe -Os -arch arm64 -pipe  -Os -DNDEBUG -Wall -fno-common -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk  -DPNG_IMPEXP=MODULE_SCOPE -DPNG_EXTERN=MODULE_SCOPE  -Wl,-single_module -current_version 1.6.37 -compatibility_version 1.6.37   -o libpngtcl1.6.37.dylib pngtcl.o pngtclStubInit.o png.o pngerror.o pngmem.o pngpread.o pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o pngget.o pngtclStubLib.o -L/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_graphics_tkimg/tkimg/work/Img-1.4.13/zlib -lzlibtclstub1.2.11 -lm -L/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_graphics_tkimg/tkimg/work/Img-1.4.13/zlib -lzlibtclstub1.2.11  -L/opt/local/lib -ltclstub8.6 -L/opt/local/lib -ltkstub8.6 
Undefined symbols for architecture arm64:
  "_png_do_expand_palette_rgb8_neon", referenced from:
      _png_do_read_transformations in pngrtran.o
  "_png_do_expand_palette_rgba8_neon", referenced from:
      _png_do_read_transformations in pngrtran.o
  "_png_init_filter_functions_neon", referenced from:
      _png_read_filter_row in pngrutil.o
  "_png_riffle_palette_neon", referenced from:
      _png_do_read_transformations in pngrtran.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Change History (7)

comment:1 Changed 2 years ago by chrstphrchvz (Christopher Chavez)

One workaround may be to configure the bundled libpng with --enable-arm-neon=no, which may impact performance, but which I believe may be fine for use with Tk (whose observable performance issues, if any, I believe would have little to do with tasks like image processing).

Last edited 2 years ago by chrstphrchvz (Christopher Chavez) (previous) (diff)

comment:2 Changed 2 years ago by chrstphrchvz (Christopher Chavez)

comment:3 in reply to:  1 Changed 2 years ago by chrstphrchvz (Christopher Chavez)

Replying to chrstphrchvz:

One workaround may be to configure the bundled libpng with --enable-arm-neon=no, which may impact performance, but which I believe may be fine for use with Tk (whose observable performance issues, if any, I believe would have little to do with tasks like image processing).

That approach probably will not work if TkImg isn’t using the configure script included with libpng, but is instead providing its own TEA-based configure script for libpng.

A different workaround could be to adapt the workaround described by https://github.com/glennrp/libpng/issues/372#issue-842388554 and https://github.com/InsightSoftwareConsortium/ITK/pull/2450 to the TkImg TEA configure script for libpng so that it builds the needed source files for the missing symbols.

See https://github.com/macports/macports-ports/pull/13147

Last edited 2 years ago by chrstphrchvz (Christopher Chavez) (previous) (diff)

comment:4 Changed 2 years ago by chrstphrchvz (Christopher Chavez)

In 54ad653fcaa6700f20242f8342abea87ea7a7779/macports-ports (master):

tkimg: attempt to fix build on ARM

See: #64067

comment:5 Changed 2 years ago by chrstphrchvz (Christopher Chavez)

The arm64 builds were successful and produce libpngtcl1.6.37.dylib containing the previously missing symbols. This ticket can be closed.

comment:6 Changed 2 years ago by Schamschula (Marius Schamschula)

Resolution: fixed
Status: assignedclosed

comment:7 Changed 2 years ago by chrstphrchvz (Christopher Chavez)

Note: See TracTickets for help on using tickets.