Build newLISP for win10 64bit

Machine-specific discussion
Unix, Linux, OS X, OS/2, Windows, ..?
Locked
cameyo
Posts: 183
Joined: Sun Mar 27, 2011 3:07 pm
Location: Italy
Contact:

Build newLISP for win10 64bit

Post by cameyo »

Which tools i need to build newLISP from source (windows 10 - 64 bit) ?
MinGW or mingw-w64 ?
Which version of gcc ?
Can someone point me on the right direction?
Thanks

HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Re: Build newLISP for win10 64bit

Post by HPW »

Hello,

Maybe this helps:

viewtopic.php?f=2&t=4958

Regards
Hans-Peter

cameyo
Posts: 183
Joined: Sun Mar 27, 2011 3:07 pm
Location: Italy
Contact:

Re: Build newLISP for win10 64bit

Post by cameyo »

@HPW:
Thanks. I have already read that...
But reading it again had help me to understand :-)
Try with: http://sourceforge.net/projects/tdm-gcc ... e/download

Have a nice day.

cameyo
Posts: 183
Joined: Sun Mar 27, 2011 3:07 pm
Location: Italy
Contact:

Re: Build newLISP for win10 64bit

Post by cameyo »

Download and install: tdm64-gcc-5.1.0-2.exe
Download and unpack newlisp source code
Change folder to source code folder
Type:

Code: Select all

make -f makefile_xxxxx
I choose "makefile_mingw64_utf8" and then "makefile_mingw64dll_utf8" for "makefile_xxxxx"
After a few seconds i got my newlisp.exe and then newlisp.dll.

Thanks Lutz and HPW

cameyo
Posts: 183
Joined: Sun Mar 27, 2011 3:07 pm
Location: Italy
Contact:

Re: Build newLISP for win10 64bit

Post by cameyo »

Update:

The "makefile_mingw64dll_utf8" gives an error on this statement:

Code: Select all

gcc -m64 -shared *.o -Wl,--kill-at -lws2_32 -o newlisp.dll
gcc.exe: error: *.o: Invalid argument
To solve this i have changed the statement:

Code: Select all

$(CC) -m64 -shared $(OBJS) -Wl,--kill-at -lws2_32 -o newlisp.dll 
Now, i have some problems to build the ffi version of newLISP.
For example using the file "makefile_mingw64_utf8_ffi" i got the following error:

Code: Select all

C:/TDM-GC~1/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
cannot find -lffi
collect2.exe: error: ld returned 1 exit status
on this line:

Code: Select all

$(CC) -m64 $(OBJS) -lws2_32 -lffi -o newlisp.exe
Maybe the -lffi option is wrong ?
Some help?

cameyo

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Re: Build newLISP for win10 64bit

Post by Lutz »

Both makefiles compile without errors and warnings on my Windows 7 and using the 5.1.0 gcc.exe (tdm64-1) compiler version.

Make sure you have the file libffi.a in the C:\MinGW\lib\gcc\x86_64-w64-mingw32\5.1.0 directory. libffi.a is not part of the MinGW distribution.

You can probably get it here: http://sourceware.org/libffi/

Ps: I believe others also have compiled on Windows 10

cameyo
Posts: 183
Joined: Sun Mar 27, 2011 3:07 pm
Location: Italy
Contact:

Re: Build newLISP for win10 64bit

Post by cameyo »

@Lutz: Thanks. I'll try it this night :-)
Regards,
cameyo

cameyo
Posts: 183
Joined: Sun Mar 27, 2011 3:07 pm
Location: Italy
Contact:

Re: Build newLISP for win10 64bit

Post by cameyo »

@Lutz: which version of libffi ?
I have tried with prebuilt binaries of libffi 3.0.13-2 and libffi 3.2.1 and both works (compile and build newLISP.exe and newLISP.dll).
How to test the result ? Is there a program/script to test newLISP build ?
Thanks
cameyo

HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Re: Build newLISP for win10 64bit

Post by HPW »

For testing and Benchmark:

Code: Select all

(module "qa-bench")
Regards
Hans-Peter

cameyo
Posts: 183
Joined: Sun Mar 27, 2011 3:07 pm
Location: Italy
Contact:

Re: Build newLISP for win10 64bit

Post by cameyo »

@HPW: Thanks. All windows test passed.
Only one drawback: the file libffi-6.dll must be registered or saved in the same folder of newlisp.exe. Why?
cameyo

Locked