-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to make femtolisp #3
Comments
Try replacing |
Ah I see the comment. Okay, made that change and got a different, even more ambiguous (to me) error: ~/Pork/femtolisp on master !
$ make clean
rm -f *.o
rm -f *.do
rm -f flisp
rm -f libflisp.a
rm -f libflisp.da
~/Pork/femtolisp on master !
$ make
gcc -O2 -DNDEBUG -falign-functions -Wall -Wno-strict-aliasing -Illt -DUSE_COMPUTED_GOTO -DMACOSX -DARCH_X86_64 -DBITS64 -D__CPU__=686 -c flisp.c -o flisp.o
gcc -O2 -DNDEBUG -falign-functions -Wall -Wno-strict-aliasing -Illt -DUSE_COMPUTED_GOTO -DMACOSX -DARCH_X86_64 -DBITS64 -D__CPU__=686 -c builtins.c -o builtins.o
gcc -O2 -DNDEBUG -falign-functions -Wall -Wno-strict-aliasing -Illt -DUSE_COMPUTED_GOTO -DMACOSX -DARCH_X86_64 -DBITS64 -D__CPU__=686 -c string.c -o string.o
gcc -O2 -DNDEBUG -falign-functions -Wall -Wno-strict-aliasing -Illt -DUSE_COMPUTED_GOTO -DMACOSX -DARCH_X86_64 -DBITS64 -D__CPU__=686 -c equalhash.c -o equalhash.o
gcc -O2 -DNDEBUG -falign-functions -Wall -Wno-strict-aliasing -Illt -DUSE_COMPUTED_GOTO -DMACOSX -DARCH_X86_64 -DBITS64 -D__CPU__=686 -c table.c -o table.o
gcc -O2 -DNDEBUG -falign-functions -Wall -Wno-strict-aliasing -Illt -DUSE_COMPUTED_GOTO -DMACOSX -DARCH_X86_64 -DBITS64 -D__CPU__=686 -c iostream.c -o iostream.o
cd llt && make
gcc -O2 -DNDEBUG -falign-functions -Wall -Wno-strict-aliasing -Illt -DUSE_COMPUTED_GOTO -DMACOSX -DARCH_X86_64 -DBITS64 -D__CPU__=686 -c flmain.c -o flmain.o
gcc -O3 -DNDEBUG -Wall -Wno-strict-aliasing -DLINUX -DARCH_X86_64 -DBITS64 -D__CPU__=686 -c bitvector.c -o bitvector.o
In file included from bitvector.c:36:
dtypes.h:32:22: error: features.h: No such file or directory
dtypes.h:33:20: error: endian.h: No such file or directory
dtypes.h:34:1: warning: "LITTLE_ENDIAN" redefined
In file included from /usr/include/machine/endian.h:35,
from /usr/include/sys/wait.h:193,
from /usr/include/stdlib.h:65,
from bitvector.c:32:
/usr/include/i386/endian.h:93:1: warning: this is the location of the previous definition
In file included from bitvector.c:36:
dtypes.h:35:1: warning: "BIG_ENDIAN" redefined
In file included from /usr/include/machine/endian.h:35,
from /usr/include/sys/wait.h:193,
from /usr/include/stdlib.h:65,
from bitvector.c:32:
/usr/include/i386/endian.h:94:1: warning: this is the location of the previous definition
In file included from bitvector.c:36:
dtypes.h:36:1: warning: "PDP_ENDIAN" redefined
In file included from /usr/include/machine/endian.h:35,
from /usr/include/sys/wait.h:193,
from /usr/include/stdlib.h:65,
from bitvector.c:32:
/usr/include/i386/endian.h:95:1: warning: this is the location of the previous definition
In file included from bitvector.c:36:
dtypes.h:37:1: warning: "BYTE_ORDER" redefined
In file included from /usr/include/machine/endian.h:35,
from /usr/include/sys/wait.h:193,
from /usr/include/stdlib.h:65,
from bitvector.c:32:
/usr/include/i386/endian.h:97:1: warning: this is the location of the previous definition
make[1]: *** [bitvector.o] Error 1
make: *** [llt/libllt.a] Error 2
make: *** Waiting for unfinished jobs....
~/Pork/femtolisp on master !
$ ls
attic/ examples/ lib/ llt/ tests/ tiny/ .git/ FLOSSING LICENSE Makefile ascii-mona-lisa ascii-mona-lisa-2 todo
todo-scrap flisp.boot builtins.c cvalues.c equal.c equalhash.c flisp.c flmain.c iostream.c opaque_type_template.c operators.c print.c read.c
string.c table.c types.c .gitignore equalhash.h flisp.h opcodes.h compiler.lsp mkboot0.lsp mkboot1.lsp system.lsp Makefile.macosx README.md
builtins.o equalhash.o flisp.o flmain.o iostream.o string.o table.o aliases.scm bootstrap.sh* |
Sorry about that. The same change is needed in |
I don't know Make syntax, but I assume you could do something like: #ifndef OS
#define OS = LINUX
CONFIG = -D$(OS) -DARCH_X86_64 -DBITS64 -D__CPU__=686 I'm assuming $(VARS) are environment variables, which they may not be. Anyway, its still not building. ~/Pork/femtolisp on master !
$ make clean; make
rm -f *.o
rm -f *.do
rm -f flisp
rm -f libflisp.a
rm -f libflisp.da
gcc -O2 -DNDEBUG -falign-functions -Wall -Wno-strict-aliasing -Illt -DUSE_COMPUTED_GOTO -DMACOSX -DARCH_X86_64 -DBITS64 -D__CPU__=686 -c flisp.c -o flisp.o
gcc -O2 -DNDEBUG -falign-functions -Wall -Wno-strict-aliasing -Illt -DUSE_COMPUTED_GOTO -DMACOSX -DARCH_X86_64 -DBITS64 -D__CPU__=686 -c builtins.c -o builtins.o
gcc -O2 -DNDEBUG -falign-functions -Wall -Wno-strict-aliasing -Illt -DUSE_COMPUTED_GOTO -DMACOSX -DARCH_X86_64 -DBITS64 -D__CPU__=686 -c string.c -o string.o
gcc -O2 -DNDEBUG -falign-functions -Wall -Wno-strict-aliasing -Illt -DUSE_COMPUTED_GOTO -DMACOSX -DARCH_X86_64 -DBITS64 -D__CPU__=686 -c equalhash.c -o equalhash.o
gcc -O2 -DNDEBUG -falign-functions -Wall -Wno-strict-aliasing -Illt -DUSE_COMPUTED_GOTO -DMACOSX -DARCH_X86_64 -DBITS64 -D__CPU__=686 -c table.c -o table.o
gcc -O2 -DNDEBUG -falign-functions -Wall -Wno-strict-aliasing -Illt -DUSE_COMPUTED_GOTO -DMACOSX -DARCH_X86_64 -DBITS64 -D__CPU__=686 -c iostream.c -o iostream.o
cd llt && make
gcc -O2 -DNDEBUG -falign-functions -Wall -Wno-strict-aliasing -Illt -DUSE_COMPUTED_GOTO -DMACOSX -DARCH_X86_64 -DBITS64 -D__CPU__=686 -c flmain.c -o flmain.o
gcc -O3 -DNDEBUG -Wall -Wno-strict-aliasing -DMACOSX -DARCH_X86_64 -DBITS64 -D__CPU__=686 -c bitvector.c -o bitvector.o
gcc -O3 -DNDEBUG -Wall -Wno-strict-aliasing -DMACOSX -DARCH_X86_64 -DBITS64 -D__CPU__=686 -c hashing.c -o hashing.o
cd tests && ../flisp unittest.lsp
gcc -O3 -DNDEBUG -Wall -Wno-strict-aliasing -DMACOSX -DARCH_X86_64 -DBITS64 -D__CPU__=686 -c socket.c -o socket.o
/bin/sh: ../flisp: No such file or directory
make: *** [test] Error 127
make: *** Waiting for unfinished jobs....
gcc -O3 -DNDEBUG -Wall -Wno-strict-aliasing -DMACOSX -DARCH_X86_64 -DBITS64 -D__CPU__=686 -c timefuncs.c -o timefuncs.o
gcc -O3 -DNDEBUG -Wall -Wno-strict-aliasing -DMACOSX -DARCH_X86_64 -DBITS64 -D__CPU__=686 -c ptrhash.c -o ptrhash.o
gcc -O3 -DNDEBUG -Wall -Wno-strict-aliasing -DMACOSX -DARCH_X86_64 -DBITS64 -D__CPU__=686 -c utf8.c -o utf8.o
gcc -O3 -DNDEBUG -Wall -Wno-strict-aliasing -DMACOSX -DARCH_X86_64 -DBITS64 -D__CPU__=686 -c ios.c -o ios.o
gcc -O3 -DNDEBUG -Wall -Wno-strict-aliasing -DMACOSX -DARCH_X86_64 -DBITS64 -D__CPU__=686 -c dirpath.c -o dirpath.o
gcc -O3 -DNDEBUG -Wall -Wno-strict-aliasing -DMACOSX -DARCH_X86_64 -DBITS64 -D__CPU__=686 -c htable.c -o htable.o
gcc -O3 -DNDEBUG -Wall -Wno-strict-aliasing -DMACOSX -DARCH_X86_64 -DBITS64 -D__CPU__=686 -c bitvector-ops.c -o bitvector-ops.o
dirpath.c:116:53: error: /Developer/Headers/FlatCarbon/Processes.h: No such file or directory
dirpath.c:117:49: error: /Developer/Headers/FlatCarbon/Files.h: No such file or directory
dirpath.c: In function ‘get_exename’:
dirpath.c:120: error: ‘ProcessSerialNumber’ undeclared (first use in this function)
dirpath.c:120: error: (Each undeclared identifier is reported only once
dirpath.c:120: error: for each function it appears in.)
dirpath.c:120: error: expected ‘;’ before ‘PSN’
dirpath.c:121: error: ‘FSRef’ undeclared (first use in this function)
dirpath.c:121: error: expected ‘;’ before ‘ref’
dirpath.c:123: warning: implicit declaration of function ‘GetCurrentProcess’
dirpath.c:123: error: ‘PSN’ undeclared (first use in this function)
dirpath.c:124: warning: implicit declaration of function ‘GetProcessBundleLocation’
dirpath.c:124: error: ‘ref’ undeclared (first use in this function)
dirpath.c:125: warning: implicit declaration of function ‘FSRefMakePath’
make[1]: *** [dirpath.o] Error 1
make[1]: *** Waiting for unfinished jobs....
ios.c:50: warning: ‘_fd_poll’ defined but not used
make: *** [llt/libllt.a] Error 2
~/Pork/femtolisp on master ? It doesn't look like its a LINUX setting in the Makefile issue anymore: $ ack LINUX
Makefile
12:# OS flags: LINUX, WIN32, MACOSX
builtins.c
384:#ifdef LINUX
flisp.c
2298:#ifdef LINUX
llt/Makefile
10:# OS flags: LINUX, WIN32, MACOSX
llt/dirpath.c
63:#ifdef LINUX
llt/dtypes.h
31:#ifdef LINUX
llt/lookup3.c
48:#ifdef LINUX
llt/timefuncs.c
85:#ifdef LINUX
109:#if defined(LINUX) || defined(MACOSX) |
still can't make, latest master
|
Looks like Could you try replacing the includes and function definition with one using https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/dyld.3.html |
i'm not a c hacker, but here's my attempt:
|
According to the man page we would need
|
fixed, same error:
edit: whoops, use |
|
I try to compile with mingw64 on Windows and I get the following error:
Can somebody help me please? |
I'm seeing a different problem on current macOS: I followed the readme for building femtolisp on current macOS. It fails with the following errors: cc -O2 -DNDEBUG -falign-functions -Wall -Wno-strict-aliasing -Illt -DUSE_COMPUTED_GOTO -DMACOSX -DARCH_X86_64 -DBITS64 -D__CPU__=686 -I"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/Developer/Headers" flisp.o builtins.o string.o equalhash.o table.o iostream.o flmain.o Undefined symbols for architecture x86_64: .... So it appears that the linker command is not correct. Also, the SDK header path does not seem to be used (and carbon is no longer available on 64 bit platforms). I was able to compile without the above SDK header path. |
Will it not build on OSX?
The text was updated successfully, but these errors were encountered: