ds-repos / ds-base

GNUstep build wrapper for FreeBSD
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Add support for ARM64 #30

Open pkgdemon opened 6 months ago

pkgdemon commented 6 months ago

The first issue to fix is packages

pkg: No packages available to install matching 'emulators/virtualbox-ose-additions' have been found in the repositories
pkg: No packages available to install matching 'graphics/drm-kmod' have been found in the repositories
pkg: No packages available to install matching 'x11-drivers/xf86-video-vmware' have been found in the repositories
*** Error code 1

Stop.
make: stopped in /root/ds-base-main
root@qemustep:~/ds-base-main # 
pkgdemon commented 6 months ago

The following seems to compile:

tools-make gnustep-base

However gnustep-gui breaks here:

Making all for service GSspell...
 Compiling file GSspell.m ...
 Linking service GSspell ...
 Creating GSspell.service/Resources/Info-gnustep.plist...
Abort trap (core dumped)
gmake[4]: *** [/Developer/Makefiles/Instance/service.make:141: GSspell.service/Resources/Info-gnustep.plist] Error 1
gmake[3]: *** [/Developer/Makefiles/Master/rules.make:297: GSspell.all.service.variables] Error 2
gmake[2]: *** [/Developer/Makefiles/Master/service.make:37: internal-all] Error 2
gmake[1]: *** [/Developer/Makefiles/Master/serial-subdirectories.make:53: internal-all] Error 2
gmake[1]: Leaving directory '/gnustep-src/libs-gui'
pkgdemon commented 6 months ago

Posting the full configure log for gnustep-gui

configure: WARNING: unrecognized options: --with-x-include, --with-x-include
checking build system type... aarch64-unknown-freebsd14.0
checking host system type... aarch64-unknown-freebsd14.0
checking target system type... aarch64-unknown-freebsd14.0
checking for gcc... clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking how to run the C preprocessor... clang -E
checking for X... libraries , headers 
checking for main in -lm... yes
checking for rint... yes
checking for rintf... yes
checking for atan2f... yes
checking for floorf... yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking mntent.h usability... no
checking mntent.h presence... no
checking for mntent.h... no
checking sys/mntent.h usability... no
checking sys/mntent.h presence... no
checking for sys/mntent.h... no
checking for struct mntent.mnt_fsname... no
checking for struct mntent.mnt_fsname... (cached) no
checking for struct mntent.mnt_dir... no
checking for struct mntent.mnt_mountp... no
checking for library containing getmntent... no
checking for getmntinfo... yes
checking for statfs... yes
checking for statvfs... yes
checking sys/statvfs.h usability... yes
checking sys/statvfs.h presence... yes
checking for sys/statvfs.h... yes
checking sys/vfs.h usability... no
checking sys/vfs.h presence... no
checking for sys/vfs.h... no
checking for struct statfs.f_flags... yes
checking for struct statfs.f_owner... yes
checking for struct statvfs.f_flag... yes
checking for struct statvfs.f_owner... no
checking jpeglib.h usability... yes
checking jpeglib.h presence... yes
checking for jpeglib.h... yes
checking for jpeg_destroy_decompress in -ljpeg... yes
checking for main in -lz... yes
checking tiffio.h usability... yes
checking tiffio.h presence... yes
checking for tiffio.h... yes
checking for TIFFReadScanline in -ltiff... yes
checking for libpng-config... yes
checking png.h usability... yes
checking png.h presence... yes
checking for png.h... yes
checking for png_sig_cmp in -lpng... yes
checking for DGifOpen in -lungif... no
configure: Checking if ungif is linked against -lX11
checking for DGifCloseFile in -lungif... no
checking for DGifOpen in -lgif... yes
checking for QuantizeBuffer... no
checking for GifQuantizeBuffer... no
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for icu-config... /usr/local/bin/icu-config
checking for ICU >= 4.0... yes
checking ICU_LIBS... -licui18n -licuuc -licudata 
checking ICU_LDFLAGS... -L/usr/local/lib 
yes
checking unicode/uchar.h usability... yes
checking unicode/uchar.h presence... yes
checking for unicode/uchar.h... yes
checking unicode/ustring.h usability... yes
checking unicode/ustring.h presence... yes
checking for unicode/ustring.h... yes
checking for new_aspell_document_checker in -laspell... no
checking for icns_read_family_from_file in -licns... no
checking sndfile.h usability... no
checking sndfile.h presence... no
checking for sndfile.h... no
checking ao/ao.h usability... no
checking ao/ao.h presence... no
checking for ao/ao.h... no
checking for new_utterance in -lflite... no
checking flite/flite.h usability... no
checking flite/flite.h presence... no
checking for flite/flite.h... no
checking for ps_start_utt in -lpocketsphinx... no
checking pocketsphinx/pocketsphinx_export.h usability... no
checking pocketsphinx/pocketsphinx_export.h presence... no
checking for pocketsphinx/pocketsphinx_export.h... no
checking for cups-config... yes
checking cups/cups.h usability... yes
checking cups/cups.h presence... yes
checking for cups/cups.h... yes
checking for cupsServer in -lcups... yes
checking whether the compiler supports -Wdeclaration-after-statement... yes
checking for the version of gnustep-gui we are compiling... 0.30.0
configure: creating ./config.status
config.status: creating config.make
config.status: creating gui.make
config.status: creating Headers/Additions/GNUstepGUI/GSVersion.h
config.status: creating Headers/Additions/GNUstepGUI/config.h
configure: WARNING: unrecognized options: --with-x-include, --with-x-include
pkgdemon commented 6 months ago

The issue lies with plmerge compiled in libs-base

gdb /System/bin/plmerge
GNU gdb (GDB) 13.2 [GDB v13.2 for FreeBSD]
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "aarch64-portbld-freebsd14.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /System/bin/plmerge...
(gdb) set args the_arguments_should come_here=as_passed in_output_of_make
(gdb) run
Starting program: /System/bin/plmerge the_arguments_should come_here=as_passed in_output_of_make

Program received signal SIGABRT, Aborted.
(gdb) bt
#0  0x0000000040e95434 in thr_kill () from /lib/libc.so.7
#1  0x0000000040e1624c in raise () from /lib/libc.so.7
#2  0x0000000040ebc140 in abort () from /lib/libc.so.7
#3  0x00000000402da8f4 in alignof_type (type=0x40733463 "t]}]^{_NSHandler}@}", align=0xffffffffd148) at /gnustep-src/libobjc2/encoding2.c:361
#4  0x00000000402db3f8 in parse_array (type=0xffffffffd130, callback=0x402da260 <alignof_type>, context=0xffffffffd148) at /gnustep-src/libobjc2/encoding2.c:90
#5  0x00000000402da860 in alignof_type (type=0x40733460 "[32t]}]^{_NSHandler}@}", align=0xffffffffd2b8) at /gnustep-src/libobjc2/encoding2.c:336
#6  0x00000000402db5e4 in parse_struct_or_union (type=0xffffffffd210, callback=0x402da260 <alignof_type>, context=0xffffffffd2b8, endchar=125 '}') at /gnustep-src/libobjc2/encoding2.c:126
#7  0x00000000402dafd0 in parse_struct (type=0xffffffffd210, callback=0x402da260 <alignof_type>, context=0xffffffffd2b8) at /gnustep-src/libobjc2/encoding2.c:139
#8  0x00000000402da810 in alignof_type (type=0x40733456 "{_jmp_buf=[32t]}]^{_NSHandler}@}", align=0xffffffffd2b8) at /gnustep-src/libobjc2/encoding2.c:324
#9  0x00000000402db3f8 in parse_array (type=0xffffffffd2a0, callback=0x402da260 <alignof_type>, context=0xffffffffd2b8) at /gnustep-src/libobjc2/encoding2.c:90
#10 0x00000000402da860 in alignof_type (type=0x40733454 "[1{_jmp_buf=[32t]}]^{_NSHandler}@}", align=0xffffffffd3d8) at /gnustep-src/libobjc2/encoding2.c:336
#11 0x00000000402db5e4 in parse_struct_or_union (type=0xffffffffd380, callback=0x402da260 <alignof_type>, context=0xffffffffd3d8, endchar=125 '}') at /gnustep-src/libobjc2/encoding2.c:126
#12 0x00000000402dafd0 in parse_struct (type=0xffffffffd380, callback=0x402da260 <alignof_type>, context=0xffffffffd3d8) at /gnustep-src/libobjc2/encoding2.c:139
#13 0x00000000402da810 in alignof_type (type=0x40733448 "{_NSHandler=[1{_jmp_buf=[32t]}]^{_NSHandler}@}", align=0xffffffffd3d8) at /gnustep-src/libobjc2/encoding2.c:324
#14 0x00000000402da8e8 in alignof_type (type=0x40733447 "^{_NSHandler=[1{_jmp_buf=[32t]}]^{_NSHandler}@}", align=0xffffffffd420) at /gnustep-src/libobjc2/encoding2.c:358
#15 0x00000000402da248 in objc_alignof_type (type=0x40733447 "^{_NSHandler=[1{_jmp_buf=[32t]}]^{_NSHandler}@}") at /gnustep-src/libobjc2/encoding2.c:377
#16 0x00000000402e7d84 in upgradeIvarList (cls=0x40c80578 <_OBJC_CLASS_NSThread>) at /gnustep-src/libobjc2/legacy.c:128
#17 0x00000000402e78a8 in objc_upgrade_class (oldClass=0x40c80578 <_OBJC_CLASS_NSThread>) at /gnustep-src/libobjc2/legacy.c:352
#18 0x00000000402dcb58 in __objc_exec_class (module=0x40c81588 <__unnamed_19>) at /gnustep-src/libobjc2/loader.c:366
#19 0x000000004024ca50 in ?? () from /libexec/ld-elf.so.1
#20 0x000000004027e000 in ?? () from /libexec/ld-elf.so.1
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) quit
A debugging session is active.

    Inferior 1 [process 63627] will be killed.
pkgdemon commented 6 months ago
ldd /System/bin/plmerge 
/System/bin/plmerge:
    libgnustep-base.so.1.29 => /System/lib/libgnustep-base.so.1.29 (0x35a0d400000)
    libobjc.so.4.6 => /System/lib/libobjc.so.4.6 (0x35a0ecc2000)
    libm.so.5 => /lib/libm.so.5 (0x35a0f5c0000)
    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x35a105f2000)
    libthr.so.3 => /lib/libthr.so.3 (0x35a117f0000)
    libc.so.7 => /lib/libc.so.7 (0x35a11fcc000)
    libgmp.so.10 => /usr/local/lib/libgmp.so.10 (0x35a10b96000)
    libdns_sd.so.1 => /usr/local/lib/libdns_sd.so.1 (0x35a12d0e000)
    libgnutls.so.30 => /usr/local/lib/libgnutls.so.30 (0x35a14761000)
    libxslt.so.1 => /usr/local/lib/libxslt.so.1 (0x35a13120000)
    libxml2.so.2 => /usr/local/lib/libxml2.so.2 (0x35a13f3f000)
    libiconv.so.2 => /usr/local/lib/libiconv.so.2 (0x35a14e75000)
    libffi.so.8 => /usr/local/lib/libffi.so.8 (0x35a1517f000)
    libkvm.so.7 => /lib/libkvm.so.7 (0x35a15be8000)
    libz.so.6 => /lib/libz.so.6 (0x35a15db7000)
    librt.so.1 => /lib/librt.so.1 (0x35a16e33000)
    libdl.so.1 => /usr/lib/libdl.so.1 (0x35a16a4a000)
    libicui18n.so.74 => /usr/local/lib/libicui18n.so.74 (0x35a1729a000)
    libicuuc.so.74 => /usr/local/lib/libicuuc.so.74 (0x35a18688000)
    libicudata.so.74 => /usr/local/lib/libicudata.so.74 (0x35a18109000)
    libcurl.so.4 => /usr/local/lib/libcurl.so.4 (0x35a1a1cb000)
    libc++.so.1 => /lib/libc++.so.1 (0x35a18fcd000)
    libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x35a19e3b000)
    libintl.so.8 => /usr/local/lib/libintl.so.8 (0x35a1bea1000)
    libp11-kit.so.0 => /usr/local/lib/libp11-kit.so.0 (0x35a1ad94000)
    libidn2.so.0 => /usr/local/lib/libidn2.so.0 (0x35a1cb84000)
    libunistring.so.5 => /usr/local/lib/libunistring.so.5 (0x35a1cc1d000)
    libtasn1.so.6 => /usr/local/lib/libtasn1.so.6 (0x35a1e683000)
    libnettle.so.8 => /usr/local/lib/libnettle.so.8 (0x35a1d18d000)
    libhogweed.so.6 => /usr/local/lib/libhogweed.so.6 (0x35a1d295000)
    liblzma.so.5 => /usr/lib/liblzma.so.5 (0x35a1d7e1000)
    libelf.so.2 => /lib/libelf.so.2 (0x35a1ee12000)
    libnghttp2.so.14 => /usr/local/lib/libnghttp2.so.14 (0x35a1fd23000)
    libssh2.so.1 => /usr/local/lib/libssh2.so.1 (0x35a1ff9a000)
    libpsl.so.5 => /usr/local/lib/libpsl.so.5 (0x35a202c7000)
    libssl.so.30 => /usr/lib/libssl.so.30 (0x35a20979000)
    libheimntlm.so.11 => /usr/lib/libheimntlm.so.11 (0x35a21e55000)
    libhx509.so.11 => /usr/lib/libhx509.so.11 (0x35a20ea8000)
    libcom_err.so.5 => /usr/lib/libcom_err.so.5 (0x35a22e11000)
    libcrypto.so.30 => /lib/libcrypto.so.30 (0x35a23dfb000)
    libasn1.so.11 => /usr/lib/libasn1.so.11 (0x35a248e9000)
    libwind.so.11 => /usr/lib/libwind.so.11 (0x35a25338000)
    libheimbase.so.11 => /usr/lib/libheimbase.so.11 (0x35a258cb000)
    libroken.so.11 => /usr/lib/libroken.so.11 (0x35a2698b000)
    libcrypt.so.5 => /lib/libcrypt.so.5 (0x35a25b26000)
    libkrb5.so.11 => /usr/lib/libkrb5.so.11 (0x35a2798a000)
    libgssapi.so.10 => /usr/lib/libgssapi.so.10 (0x35a28f77000)
    libgssapi_krb5.so.10 => /usr/lib/libgssapi_krb5.so.10 (0x35a289af000)
    libmd.so.6 => /lib/libmd.so.6 (0x35a29e6d000)
    libprivateheimipcc.so.11 => /usr/lib/libprivateheimipcc.so.11 (0x35a2acbe000)
pkgdemon commented 6 months ago

The issue has been narrowed down to libobjc2. Currently the arm64 branch works with libobjc2 installed from pkg. I need to review deeper to figure out how to get our libobjc2 to build a working plmerge.

pkgdemon commented 6 months ago

Capturing ldd from ports version to compare

ldd /usr/local/GNUstep/System/Tools/plmerge
/usr/local/GNUstep/System/Tools/plmerge:
    libgnustep-base.so.1.29 => /usr/local/GNUstep/System/Library/Libraries/libgnustep-base.so.1.29 (0x223cddc00000)
    libobjc.so.4.6 => /usr/local/lib/libobjc.so.4.6 (0x223cdc099000)
    libm.so.5 => /lib/libm.so.5 (0x223cdc3dd000)
    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x223cdc589000)
    libthr.so.3 => /lib/libthr.so.3 (0x223cdce16000)
    libc.so.7 => /lib/libc.so.7 (0x223cdfaaf000)
    libgmp.so.10 => /usr/local/lib/libgmp.so.10 (0x223cdec46000)
    libavahi-common.so.3 => /usr/local/lib/libavahi-common.so.3 (0x223ce14be000)
    libavahi-client.so.3 => /usr/local/lib/libavahi-client.so.3 (0x223ce0c3c000)
    libgnutls.so.30 => /usr/local/lib/libgnutls.so.30 (0x223ce1adb000)
    libxslt.so.1 => /usr/local/lib/libxslt.so.1 (0x223ce2cc4000)
    libxml2.so.2 => /usr/local/lib/libxml2.so.2 (0x223ce3da2000)
    libffi.so.8 => /usr/local/lib/libffi.so.8 (0x223ce3a28000)
    libkvm.so.7 => /lib/libkvm.so.7 (0x223ce4a59000)
    libz.so.6 => /lib/libz.so.6 (0x223ce63ea000)
    librt.so.1 => /lib/librt.so.1 (0x223ce593f000)
    libdl.so.1 => /usr/lib/libdl.so.1 (0x223ce73d4000)
    libicui18n.so.74 => /usr/local/lib/libicui18n.so.74 (0x223ce7e0a000)
    libicuuc.so.74 => /usr/local/lib/libicuuc.so.74 (0x223ce8705000)
    libicudata.so.74 => /usr/local/lib/libicudata.so.74 (0x223ce9351000)
    libcurl.so.4 => /usr/local/lib/libcurl.so.4 (0x223ce99cc000)
    libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x223ceb9e3000)
    libintl.so.8 => /usr/local/lib/libintl.so.8 (0x223ce9db0000)
    libdbus-1.so.3 => /usr/local/lib/libdbus-1.so.3 (0x223ceaadb000)
    libp11-kit.so.0 => /usr/local/lib/libp11-kit.so.0 (0x223ced1ba000)
    libidn2.so.0 => /usr/local/lib/libidn2.so.0 (0x223cebe74000)
    libunistring.so.5 => /usr/local/lib/libunistring.so.5 (0x223cecc9b000)
    libtasn1.so.6 => /usr/local/lib/libtasn1.so.6 (0x223cedae3000)
    libnettle.so.8 => /usr/local/lib/libnettle.so.8 (0x223cee7ee000)
    libhogweed.so.6 => /usr/local/lib/libhogweed.so.6 (0x223cef472000)
    liblzma.so.5 => /usr/lib/liblzma.so.5 (0x223cef4e9000)
    libelf.so.2 => /lib/libelf.so.2 (0x223cf0fe9000)
    libc++.so.1 => /lib/libc++.so.1 (0x223cefc50000)
    libnghttp2.so.14 => /usr/local/lib/libnghttp2.so.14 (0x223cf0a58000)
    libssh2.so.1 => /usr/local/lib/libssh2.so.1 (0x223cf1179000)
    libpsl.so.5 => /usr/local/lib/libpsl.so.5 (0x223cf23d1000)
    libssl.so.30 => /usr/lib/libssl.so.30 (0x223cf1d40000)
    libheimntlm.so.11 => /usr/lib/libheimntlm.so.11 (0x223cf2413000)
    libhx509.so.11 => /usr/lib/libhx509.so.11 (0x223cf3954000)
    libcom_err.so.5 => /usr/lib/libcom_err.so.5 (0x223cf2f07000)
    libcrypto.so.30 => /lib/libcrypto.so.30 (0x223cf44d8000)
    libasn1.so.11 => /usr/lib/libasn1.so.11 (0x223cf54da000)
    libwind.so.11 => /usr/lib/libwind.so.11 (0x223cf6ec4000)
    libheimbase.so.11 => /usr/lib/libheimbase.so.11 (0x223cf5e1e000)
    libroken.so.11 => /usr/lib/libroken.so.11 (0x223cf6a37000)
    libcrypt.so.5 => /lib/libcrypt.so.5 (0x223cf767a000)
    libkrb5.so.11 => /usr/lib/libkrb5.so.11 (0x223cf889f000)
    libgssapi.so.10 => /usr/lib/libgssapi.so.10 (0x223cf7ba2000)
    libgssapi_krb5.so.10 => /usr/lib/libgssapi_krb5.so.10 (0x223cfa059000)
    libexecinfo.so.1 => /usr/lib/libexecinfo.so.1 (0x223cf96a9000)
    libmd.so.6 => /lib/libmd.so.6 (0x223cfab0b000)
    libprivateheimipcc.so.11 => /usr/lib/libprivateheimipcc.so.11 (0x223cfc2e3000)