Re: Branch Version_2_7_0pre

"Kirill A. Korinsky" <[email protected]>
Newsgroups gmane.lisp.gcl.devel
Message-ID <[email protected]>
Status update on i386:

1. ./configure had passed

2. gprof was enabled by default again which lead to

Undefined symbols for architecture i386:
  "__mcleanup", referenced from:
      _fSmcleanup in libpre_gcl.a(gprof.o)
      _gprof_cleanup in libpre_gcl.a(gprof.o)
ld: symbol(s) not found for architecture i386

May we ban gprof on macOS completley?

3. Unfortunately system's gcc / ld is too old, so old that it doesn't support -no_pie this can be excluded by patch like this:

--- configure.in
+++ configure.in
@@ -341,7 +341,9 @@ case $use in
     386-macosx)
 #	assert_arg_to_cflags -Wno-error=implicit-function-declaration
 	add_arg_to_cflags -Wno-incomplete-setjmp-declaration
-	assert_arg_to_ldflags -Wl,-no_pie
+	if test "$build_cpu" != "i386" ; then
+	   assert_arg_to_ldflags -Wl,-no_pie
+	fi
 	if test "$build_cpu" = "x86_64" ; then
 	    assert_arg_to_cflags -m64
 	    assert_arg_to_ldflags -m64

anyway, it leads to an error:

grep: raw_pre_gcl_map: No such file or directory
touch raw_pre_gcl_map
/usr/bin/gcc-4.2 -std=gnu99 -Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport -arch i386 -no-pie -m32 -Wl,-headerpad,56 -o raw_pre_gcl   -L.   -lpre_gcl `echo -lm  -lgmp -lreadline | sed -e 's/-lncurses/ /'` -lc -lgclp
ld: absolute addressing (perhaps -mdynamic-no-pic) used in _Llower_case_p from ./libpre_gcl.a(character.o) not allowed in slidable image. Use '-read_only_relocs suppress' to enable text relocs
collect2: ld returned 1 exit status
make[1]: *** [raw_pre_gcl_map] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_Volumes_SharedFolders_Home_src_macports-ports_lang_gcl/gcl-devel/work/33a195d5cec2a7f8f563e11c0f1a3011ea0b30a0/gcl/unixport'
make: *** [unixport/saved_pre_gcl] Error 2

4. So, I've decided to ban system's compiler. MacPorts uses clang by default which lead  to an issue:
# ld: illegal text-relocation to ___stack_chk_guard in /usr/lib/libSystem.dylib from _emsg in ...

Somewhere here I feel that ban clang as well right now isn't bad idea :)

5. So, it had compiled suceffuly by GCC-7 which lead to the issue:

grep: raw_pre_gcl_map: No such file or directory
touch raw_pre_gcl_map
/opt/local/bin/gcc-mp-7 -Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport -arch i386 -no-pie -Wl,-no_pie -m32 -Wl,-headerpad,56 -o raw_pre_gcl   -L.   -lpre_gcl `echo -lm  -lgmp -lreadline | sed -e 's/-lncurses/ /'` -lc -lgclp
cp init_raw.lsp foo
echo "(unless si::*quit-tags* (in-package \"USER\")(system:save-system \"saved_pre_gcl\"))" >>foo
ar x libpre_gcl.a $(ar t libpre_gcl.a |grep ^gcl_)
/opt/local/var/macports/build/_Volumes_SharedFolders_Home_src_macports-ports_lang_gcl/gcl-devel/work/33a195d5cec2a7f8f563e11c0f1a3011ea0b30a0/gcl/unixport/raw_pre_gcl /opt/local/var/macports/build/_Volumes_SharedFolders_Home_src_macports-ports_lang_gcl/gcl-devel/work/33a195d5cec2a7f8f563e11c0f1a3011ea0b30a0/gcl/unixport/ -libdir /opt/local/var/macports/build/_Volumes_SharedFolders_Home_src_macports-ports_lang_gcl/gcl-devel/work/33a195d5cec2a7f8f563e11c0f1a3011ea0b30a0/gcl/ < foo
/bin/sh: line 1: 25726 Illegal instruction     /opt/local/var/macports/build/_Volumes_SharedFolders_Home_src_macports-ports_lang_gcl/gcl-devel/work/33a195d5cec2a7f8f563e11c0f1a3011ea0b30a0/gcl/unixport/raw_pre_gcl /opt/local/var/macports/build/_Volumes_SharedFolders_Home_src_macports-ports_lang_gcl/gcl-devel/work/33a195d5cec2a7f8f563e11c0f1a3011ea0b30a0/gcl/unixport/ -libdir /opt/local/var/macports/build/_Volumes_SharedFolders_Home_src_macports-ports_lang_gcl/gcl-devel/work/33a195d5cec2a7f8f563e11c0f1a3011ea0b30a0/gcl/ < foo
make[1]: *** [saved_pre_gcl] Error 132

which probably the same that I've investigated in different thread.

--
wbr, Kirill

> On 23. Dec 2023, at 16:25, Camm Maguire <[email protected]> wrote:
> 
> I've committed some preliminary support for this.  Please note the
> register context code is highly non-portable and will take some love to
> get right on macosx.  This should be an optional feature.  These macros
> support disassembling code at the point of FPE errors.  When all is
> ready, you might try
> 
>> (load (compile-file "../lsp/gcl_fpe_test.lsp"))
> 
> Take care,
> 
> "Kirill A. Korinsky" <[email protected]> writes:
> 
>> i386
>> 
>> 1. it has missed AC_CHECK_SIZEOF(char,0) in configure.in
>> 
>> 2. it has missed FPE_RLST for the case non x86_64, see config.h and 386-macosx.h
> 
> --
> Camm Maguire			     		    [email protected]
> ==========================================================================
> "The earth is but one country, and mankind its citizens."  --  Baha'u'llah
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE3/KLNtcfWfLw7JxqmNjZhndZIm4FAmWHDn0ACgkQmNjZhndZ
Im4vbxAAh8tnDQ7WLuOx3ROsT/MujzWEcdb7CXZqOlJ49MTt2pMZp7JvUh7UeMDT
jOzIP8SAsVSedrfcqpZr0cyDWAjI7hooooSEqFlY26Wgz6AS4MgIryfNVkvgJyo+
rN83bI3XSjW7Bx32oQVc22mP0odJoFNs71IEA3hhqRwmORoWdHxI/UobXBtZ/ckG
pYz/3ZSWOJbqzY6KVPZfvbN95Zm79NJHRE51dRlN0GN0GrUEPn/H4rjIlEuvOP0Q
gbijdykBLrNOcK7d61EU1v4MaRULkBlWWD+K/xXfJoZB56Qw+y0tm1OHZYeafS7k
9n3kn5d/t+5G+5aNqL1EjqZ43uZFF9c6N7HevdWfOs0KBvOXuZw7lLEvA4dJsUUh
SKRaPFVAfIo8uCpzLzP4ewynhgdxeanzpQQHG4snenKyIXy0kABS8/QF7CVcaFys
KcvNkI4eg59ide3YxHw45Mng/I4kTZ7Uqyy5HEasisGE1/5AHG6eYRxSjgKT2uBt
uLL/gCK92YDXlUqouNUh2Is4ujAfOl0ViUHvPzo9wLDMy0yjU3f42rXmMi5bP/MI
U5jQb2JraFJJwYgpdDlammaoPAN2tysi1908tNPR84EvRTGLST0h6AHlDXBJmWdr
SkkvXe/wgvSQjgTAGahxquDxZs3jqrHpPtJHBOZNFwPUuhzAtbQ=
=8/xN
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.