Created
March 21, 2015 02:06
-
-
Save cryptorick/7545249ab7fcd8ffee4e to your computer and use it in GitHub Desktop.
On OpenBSD 5.6 (i386), two unit tests fail after building 32-bit picolisp with base system gcc (4.2.1)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# FYI, platform and gcc version. | |
# | |
$ uname -a | |
OpenBSD obsd32.my.domain 5.6 GENERIC#274 i386 | |
$ gcc --version | |
gcc (GCC) 4.2.1 20070719 | |
Copyright (C) 2007 Free Software Foundation, Inc. | |
This is free software; see the source for copying conditions. There is NO | |
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
# | |
# FYI, build messages. | |
# | |
$ pwd | |
/home/rick/builds/picoLisp-3.1.9.12/src | |
$ gmake | |
gcc -c -O2 -pipe -falign-functions=32 -fomit-frame-pointer -fno-strict-aliasing -W -Wimplicit -Wreturn-type -Wunused -Wformat -Wuninitialized -Wstrict-prototypes -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -m32 -D_OS='"OpenBSD"' main.c | |
gcc -c -O2 -pipe -falign-functions=32 -fomit-frame-pointer -fno-strict-aliasing -W -Wimplicit -Wreturn-type -Wunused -Wformat -Wuninitialized -Wstrict-prototypes -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -m32 -D_OS='"OpenBSD"' gc.c | |
gcc -c -O2 -pipe -falign-functions=32 -fomit-frame-pointer -fno-strict-aliasing -W -Wimplicit -Wreturn-type -Wunused -Wformat -Wuninitialized -Wstrict-prototypes -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -m32 -D_OS='"OpenBSD"' apply.c | |
gcc -c -O2 -pipe -falign-functions=32 -fomit-frame-pointer -fno-strict-aliasing -W -Wimplicit -Wreturn-type -Wunused -Wformat -Wuninitialized -Wstrict-prototypes -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -m32 -D_OS='"OpenBSD"' flow.c | |
flow.c: In function 'doTick': | |
flow.c:1583: warning: cast to pointer from integer of different size | |
flow.c:1584: warning: cast to pointer from integer of different size | |
gcc -c -O2 -pipe -falign-functions=32 -fomit-frame-pointer -fno-strict-aliasing -W -Wimplicit -Wreturn-type -Wunused -Wformat -Wuninitialized -Wstrict-prototypes -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -m32 -D_OS='"OpenBSD"' sym.c | |
gcc -c -O2 -pipe -falign-functions=32 -fomit-frame-pointer -fno-strict-aliasing -W -Wimplicit -Wreturn-type -Wunused -Wformat -Wuninitialized -Wstrict-prototypes -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -m32 -D_OS='"OpenBSD"' subr.c | |
gcc -c -O2 -pipe -falign-functions=32 -fomit-frame-pointer -fno-strict-aliasing -W -Wimplicit -Wreturn-type -Wunused -Wformat -Wuninitialized -Wstrict-prototypes -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -m32 -D_OS='"OpenBSD"' big.c | |
big.c:7:1: warning: "MAX" redefined | |
In file included from /usr/include/netdb.h:93, | |
from pico.h:30, | |
from big.c:5: | |
/usr/include/sys/param.h:217:1: warning: this is the location of the previous definition | |
gcc -c -O2 -pipe -falign-functions=32 -fomit-frame-pointer -fno-strict-aliasing -W -Wimplicit -Wreturn-type -Wunused -Wformat -Wuninitialized -Wstrict-prototypes -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -m32 -D_OS='"OpenBSD"' io.c | |
io.c: In function 'doEcho': | |
io.c:2261: warning: 'op' may be used uninitialized in this function | |
gcc -c -O2 -pipe -falign-functions=32 -fomit-frame-pointer -fno-strict-aliasing -W -Wimplicit -Wreturn-type -Wunused -Wformat -Wuninitialized -Wstrict-prototypes -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -m32 -D_OS='"OpenBSD"' net.c | |
gcc -c -O2 -pipe -falign-functions=32 -fomit-frame-pointer -fno-strict-aliasing -W -Wimplicit -Wreturn-type -Wunused -Wformat -Wuninitialized -Wstrict-prototypes -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -m32 -D_OS='"OpenBSD"' tab.c | |
mkdir -p ../bin ../lib | |
gcc -o ../bin/picolisp -m32 -rdynamic -Wl,-E main.o gc.o apply.o flow.o sym.o subr.o big.o io.o net.o tab.o -lm | |
main.o(.text+0xa35): In function `sharedLib': | |
: warning: strcpy() is almost always misused, please use strlcpy() | |
big.o(.text+0x3971): In function `numToSym': | |
: warning: sprintf() is often misused, please use snprintf() | |
strip ../bin/picolisp | |
gcc -c -O2 -pipe -falign-functions=32 -fomit-frame-pointer -fno-strict-aliasing -W -Wimplicit -Wreturn-type -Wunused -Wformat -Wuninitialized -Wstrict-prototypes -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -m32 -D_OS='"OpenBSD"' ext.c | |
gcc -o ../lib/ext -Wl,-E -Wl,-shared ext.o -lcrypto | |
strip ../lib/ext | |
gcc -c -O2 -pipe -falign-functions=32 -fomit-frame-pointer -fno-strict-aliasing -W -Wimplicit -Wreturn-type -Wunused -Wformat -Wuninitialized -Wstrict-prototypes -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -m32 -D_OS='"OpenBSD"' ht.c | |
gcc -o ../lib/ht -Wl,-E -Wl,-shared ht.o | |
strip ../lib/ht | |
$ echo $? | |
0 | |
# | |
# Unit tests will hang. Hmmm. I have to press Ctrl-C after a few minutes. | |
# | |
$ ./pil lib/test.l $(/bin/pwd) -bye + | |
^C$ | |
# | |
# Let's see what is going on. | |
# | |
$ ./pil + | |
: (setq *CMD (cmd)) | |
-> "./bin/picolisp" | |
: (setq *PWD "/home/rick/builds/picoLisp-3.1.9.12") | |
-> "/home/rick/builds/picoLisp-3.1.9.12" | |
: (test T (pool (tmp "db"))) | |
-> NIL | |
: (load "@test/src/main.l") | |
-> NIL | |
: (load "@test/src/apply.l") | |
-> NIL | |
: (load "@test/src/flow.l") | |
-> NIL | |
: (load "@test/src/sym.l") | |
-> NIL | |
: (load "@test/src/subr.l") | |
-> NIL | |
: (load "@test/src/big.l") | |
-> NIL | |
: (load "@test/src/io.l") | |
-> NIL | |
: (load "@test/src/db.l") | |
-> NIL | |
: (load "@test/src/net.l") | |
(msg Prg) | |
! | |
((let P (port T 0 "UdpPort") (if (fork) (udp P) (close P) (wait 400) (udp "localhost" "UdpPort" '(a b c)) (bye)))) | |
[test/src/net.l:18] (a b c) -- 'test' failed | |
? | |
# | |
# Ah! Hangs at `(load "@test/src/net.l")` because of `udp`. I have to press Ctrl-C, | |
# then Enter to get the "'test' failed" message. | |
# | |
# This is the only other test that fails. Why? `udp` call again: | |
# | |
: (load "@test/lib.l") | |
(wait NIL (and *A *B)) | |
! | |
(wait NIL (and *A *B)) | |
! (quit) | |
: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment