compile on openBSD arm64 fails

Bug #2009585 reported by okflo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

compiling sbcl 2.3.2 on openBSD 7.2 aarch64 / arm with host sbcl 2.0.5-arm64-openbsd67 fails:

sh make.sh --fancy

egcc -g -Wall -Wundef -Wsign-compare -Wpointer-arith -O3 -pthread -fno-pie -fno-pie -I. -c -o murmur_hash.o murmur_hash.c
egcc -g -Wall -Wundef -Wsign-compare -Wpointer-arith -O3 -pthread -fno-pie -fno-pie -I. -c -o os-common.o os-common.c
In file included from target-os.h:93,
                 from os.h:59,
                 from globals.h:19,
                 from os-common.c:18:
os-common.c: In function 'set_os_context_pc':
target-arch-os.h:13:41: warning: statement with no effect [-Wunused-value]
   13 | # define OS_CONTEXT_PC(context) context->sc_elr;
os-common.c:358:5: note: in expansion of macro 'OS_CONTEXT_PC'
  358 | OS_CONTEXT_PC(context) = pc;
      | ^~~~~~~~~~~~~
os-common.c:358:28: error: expected expression before '=' token
  358 | OS_CONTEXT_PC(context) = pc;
      | ^
In file included from target-os.h:93,
                 from os.h:59,
                 from globals.h:19,
                 from os-common.c:18:
os-common.c: In function 'os_context_pc_addr':
target-arch-os.h:13:49: error: expected ')' before ';' token
   13 | # define OS_CONTEXT_PC(context) context->sc_elr;
      | ^
os-common.c:361:38: note: in expansion of macro 'OS_CONTEXT_PC'
  361 | return (os_context_register_t*)&(OS_CONTEXT_PC(context));
      | ^~~~~~~~~~~~~
os-common.c:361:37: note: to match this '('
  361 | return (os_context_register_t*)&(OS_CONTEXT_PC(context));
      | ^
gmake: *** [<builtin>: os-common.o] Error 1
gmake: Leaving directory '/home/okflo/install/sbcl-2.3.2/src/runtime'

> uname -a
OpenBSD reddwarf.xxxx.at 7.2 GENERIC.MP#7 arm64

> sbcl --version SBCL 2.0.5

Revision history for this message
Douglas Katzman (dougk) wrote :

I think it just needed
-# define OS_CONTEXT_PC(context) context->sc_elr;
+# define OS_CONTEXT_PC(context) context->sc_elr
but I can't test it. I pushed it anyway. Can you test at the latest commit?

Douglas Katzman (dougk)
Changed in sbcl:
status: New → Fix Committed
Revision history for this message
okflo (okflo) wrote :

Hi Douglas, many thanks for the very fast response, yep that fixed it.

Just one remark - openBSD has zstd.h, libzstd, etc in /usr/local/include or rather /usr/local/lib. out of the box it doesn't find it.

Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.