SWI-Prolog / swipl-devel

SWI-Prolog Main development repository
http://www.swi-prolog.org
Other
954 stars 172 forks source link

[s390x] fails to build ... division by zero in (SIZEOF_WORD/SIZEOF_CODE) #1286

Open mcepl opened 3 months ago

mcepl commented 3 months ago

When building swipl 9.3.7 for openSUSE/Factory the build fails on s390x architecture:

[  236s] /home/abuild/rpmbuild/BUILD/swipl-9.3.7/src/pl-incl.h:593:45: error: division by zero in #if
[  236s]   593 | #define CODES_PER_WORD          (SIZEOF_WORD/SIZEOF_CODE)

Complete build log with details of all packages used and all steps taken to reproduce.

JanWielemaker commented 3 months ago

Hmm. SIZEOF_CODE is defined as SIZEOF_VOIDP. The logs say

[   81s] -- Check size of void * - done

But no indication about the result. It is a bit hard to see why the size checks do not work. They need to work to get everything compiled correctly ... Possibly you can get hold of CMakeCache.txt and the CMake log files?

mcepl commented 3 months ago

This and more in https://mcepl.fedorapeople.org/tmp/swipl-9.3.7-build.tar.gz Build log is https://mcepl.fedorapeople.org/tmp/_log-swipl-s390x.txt

Build for openSUSE/Factory (host machine is SLE-15-SP4, if it matters).