On Tue, May 20, 2025 at 04:29:43PM -0700, Greg Chandler wrote: > > I've run into this: > alpha-linux-gnu-gcc -DHAVE_CONFIG_H -DACTUAL_TIC="\"`echo tic| sed > 's/$//'|sed 's,$,,;s,^,,'|sed 's/$//'`\"" -I../progs -I../ncurses > -I../ncurses -I. -I../include -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DNDEBUG > -O2 --param max-inline-insns-single=1200 -fPIC -c ../progs/dump_entry.c -o > ../obj_s/dump_entry.o > cc1: warning: '-fstack-protector' not supported for this target > alpha-linux-gnu-gcc ../obj_s/clear.o ../obj_s/clear_cmd.o > ../obj_s/tty_settings.o -L../lib -DHAVE_CONFIG_H -DACTUAL_TIC="\"`echo tic| > sed 's/$//'|sed 's,$,,;s,^,,'|sed 's/$//'`\"" -I../progs -I../ncurses > -I../ncurses -I. -I../include -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DNDEBUG > -O2 --param max-inline-insns-single=1200 -fPIC -ltinfo -o clear > alpha-linux-gnu-gcc ../obj_s/tabs.o ../obj_s/tty_settings.o -L../lib > -DHAVE_CONFIG_H -DACTUAL_TIC="\"`echo tic| sed 's/$//'|sed > 's,$,,;s,^,,'|sed 's/$//'`\"" -I../progs -I../ncurses -I../ncurses -I. > -I../include -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DNDEBUG -O2 --param > max-inline-insns-single=1200 -fPIC -ltinfo -o tabs > alpha-linux-gnu-gcc ../obj_s/tset.o ../obj_s/reset_cmd.o > ../obj_s/transform.o ../obj_s/tty_settings.o -L../lib -DHAVE_CONFIG_H > -DACTUAL_TIC="\"`echo tic| sed 's/$//'|sed 's,$,,;s,^,,'|sed > 's/$//'`\"" -I../progs -I../ncurses -I../ncurses -I. -I../include > -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DNDEBUG -O2 --param > max-inline-insns-single=1200 -fPIC -ltinfo -o tset > alpha-linux-gnu-gcc ../obj_s/toe.o -L../lib -DHAVE_CONFIG_H > -DACTUAL_TIC="\"`echo tic| sed 's/$//'|sed 's,$,,;s,^,,'|sed > 's/$//'`\"" -I../progs -I../ncurses -I../ncurses -I. -I../include > -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DNDEBUG -O2 --param > max-inline-insns-single=1200 -fPIC -L../lib -ltic -ltinfo -o toe > alpha-linux-gnu-gcc ../obj_s/tput.o ../obj_s/clear_cmd.o > ../obj_s/reset_cmd.o ../obj_s/tparm_type.o ../obj_s/transform.o > ../obj_s/tty_settings.o -L../lib -DHAVE_CONFIG_H -DACTUAL_TIC="\"`echo tic| > sed 's/$//'|sed 's,$,,;s,^,,'|sed 's/$//'`\"" -I../progs -I../ncurses > -I../ncurses -I. -I../include -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DNDEBUG > -O2 --param max-inline-insns-single=1200 -fPIC -ltinfo -o tput > alpha-linux-gnu-gcc ../obj_s/infocmp.o ../obj_s/dump_entry.o -L../lib > -DHAVE_CONFIG_H -DACTUAL_TIC="\"`echo tic| sed 's/$//'|sed > 's,$,,;s,^,,'|sed 's/$//'`\"" -I../progs -I../ncurses -I../ncurses -I. > -I../include -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DNDEBUG -O2 --param > max-inline-insns-single=1200 -fPIC -L../lib -ltic -ltinfo -o infocmp > alpha-linux-gnu-gcc ../obj_s/tic.o ../obj_s/dump_entry.o > ../obj_s/tparm_type.o ../obj_s/transform.o -L../lib -DHAVE_CONFIG_H > -DACTUAL_TIC="\"`echo tic| sed 's/$//'|sed 's,$,,;s,^,,'|sed > 's/$//'`\"" -I../progs -I../ncurses -I../ncurses -I. -I../include > -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DNDEBUG -O2 --param > max-inline-insns-single=1200 -fPIC -L../lib -ltic -ltinfo -o tic > /opt/tools/bin/../lib/gcc/alpha-linux-gnu/14.2.0/../../../../alpha-linux-gnu/bin/ld: > ../obj_s/tic.o: in function `main': > (.text.startup+0x7c): undefined reference to `atexit' > /opt/tools/bin/../lib/gcc/alpha-linux-gnu/14.2.0/../../../../alpha-linux-gnu/bin/ld: > (.text.startup+0x84): undefined reference to `atexit' > collect2: error: ld returned 1 exit status > make[1]: *** [Makefile:278: tic] Error 1 > make[1]: Leaving directory '/tmp/ncurses-6.5-20250503/progs' > make: *** [Makefile:136: all] Error 2
man atexit
NAME
atexit - register a function to be called at normal process termination
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#include <stdlib.h>
int atexit(void (*function)(void));
...
STANDARDS
POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD.
> I have all the logs for the build, but don't know if there is anything in
> particular that will help...
> This does build without errors on the build compiler, just not the cross:
> Any ideas?
Perhaps the target's runtime doesn't have atexit
If it's convenient (and not too large), a compressed tar of its include-files
would help determine what configure-checks might help in cross-compiling to
that. If that's "large", sending it to me directly (or showing where I can
download the tar) is best practice.
For the existing configure script, config.log and config.status can tell
me a lot, but if it's lacking atexit there are probably other gaps.
> Cross compiler:
> root@constellation:/opt/build/ncurses# alpha-linux-gnu-gcc -v
> Using built-in specs.
> COLLECT_GCC=alpha-linux-gnu-gcc
> COLLECT_LTO_WRAPPER=/opt/tools/bin/../libexec/gcc/alpha-linux-gnu/14.2.0/lto-wrapper
> Target: alpha-linux-gnu
> Configured with: ../gcc-14.2.0/configure --target=alpha-linux-gnu
> --prefix=/opt//tools --with-glibc-version=2.41 --with-sysroot=/opt/
> --with-newlib --without-headers --enable-default-pie --enable-default-ssp
> --disable-nls --disable-shared --disable-multilib --disable-threads
> --disable-libatomic --disable-libgomp --disable-libquadmath --disable-libssp
> --disable-libvtv --disable-libstdcxx --enable-languages=c,c++
> Thread model: single
> Supported LTO compression algorithms: zlib zstd
> gcc version 14.2.0 (GCC)
>
>
> root@constellation:/opt/build/ncurses# alpha-linux-gnu-ld -V
> GNU ld (GNU Binutils) 2.44
> Supported emulations:
> elf64alpha
> alpha
> root@constellation:/opt/build/ncurses# alpha-linux-gnu-ld -v
> GNU ld (GNU Binutils) 2.44
>
>
>
>
>
>
>
> Build compiler:
> root@constellation:/opt/build/ncurses# gcc -v
> Reading specs from /usr/lib64/gcc/x86_64-slackware-linux/14.2.0/specs
> COLLECT_GCC=gcc
> COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-slackware-linux/14.2.0/lto-wrapper
> Target: x86_64-slackware-linux
> Configured with: ../configure --prefix=/usr --libdir=/usr/lib64
> --mandir=/usr/man --infodir=/usr/info --enable-shared --enable-bootstrap
> --enable-languages=ada,c,c++,d,fortran,go,lto,m2,objc,obj-c++,rust
> --enable-threads=posix --enable-checking=release --with-system-zlib
> --enable-libstdcxx-dual-abi --with-default-libstdcxx-abi=new
> --disable-libstdcxx-pch --disable-libunwind-exceptions --enable-__cxa_atexit
> --disable-libssp --enable-gnu-indirect-function --enable-gnu-unique-object
> --enable-plugin --enable-lto --disable-install-libiberty --disable-werror
> --with-gnu-ld --with-isl --verbose --with-arch-directory=amd64
> --disable-gtktest --enable-clocale=gnu --with-arch=x86-64 --enable-multilib
> --target=x86_64-slackware-linux --build=x86_64-slackware-linux
> --host=x86_64-slackware-linux
> Thread model: posix
> Supported LTO compression algorithms: zlib zstd
> gcc version 14.2.0 (GCC)
>
>
> root@constellation:/opt/build/ncurses# ld -V
> GNU ld version 2.44-slack151
> Supported emulations:
> elf_x86_64
> elf32_x86_64
> elf_i386
> elf_iamcu
> i386pe
> elf64bpf
>
> root@constellation:/opt/build/ncurses# ld -v
> GNU ld version 2.44-slack151
>
>
--
Thomas E. Dickey <[email protected]>
https://invisible-island.net
signature.asc
Description: PGP signature
