newLISP Fan Club

Forum => newLISP and the O.S. => Topic started by: cameyo on February 16, 2019, 06:37:28 AM

Title: Build newLISP for win10 64bit
Post by: cameyo on February 16, 2019, 06:37:28 AM
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
Title: Re: Build newLISP for win10 64bit
Post by: HPW on February 16, 2019, 06:39:45 AM
Hello,



Maybe this helps:



http://www.newlispfanclub.alh.net/forum/viewtopic.php?f=2&t=4958



Regards
Title: Re: Build newLISP for win10 64bit
Post by: cameyo on February 16, 2019, 07:53:14 AM
@HPW:

Thanks. I have already read that...

But reading it again had help me to understand :-)

Try with: //http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/tdm64-gcc-5.1.0-2.exe/download



Have a nice day.
Title: Re: Build newLISP for win10 64bit
Post by: cameyo on February 17, 2019, 04:27:29 AM
Download and install:  tdm64-gcc-5.1.0-2.exe

Download and unpack newlisp source code

Change folder to source code folder

Type: 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
Title: Re: Build newLISP for win10 64bit
Post by: cameyo on February 18, 2019, 10:36:26 AM
Update:



The "makefile_mingw64dll_utf8" gives an error on this statement:
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:
$(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:
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:
$(CC) -m64 $(OBJS) -lws2_32 -lffi -o newlisp.exe
Maybe the -lffi option is wrong ?

Some help?



cameyo
Title: Re: Build newLISP for win10 64bit
Post by: Lutz on February 18, 2019, 01:13:52 PM
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:MinGWlibgccx86_64-w64-mingw325.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
Title: Re: Build newLISP for win10 64bit
Post by: cameyo on February 19, 2019, 05:41:34 AM
@Lutz: Thanks. I'll try it this night :-)

Regards,

cameyo
Title: Re: Build newLISP for win10 64bit
Post by: cameyo on February 19, 2019, 09:25:48 AM
@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
Title: Re: Build newLISP for win10 64bit
Post by: HPW on February 19, 2019, 09:08:34 PM
For testing and Benchmark:


(module "qa-bench")

Regards
Title: Re: Build newLISP for win10 64bit
Post by: cameyo on February 20, 2019, 08:42:52 AM
@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
Title: Re: Build newLISP for win10 64bit
Post by: IVShilov on November 12, 2023, 10:59:24 PM
Maybe in 2019 it was so simple,but in 2023 it is not :)
TDM have no ls, rm utilities, so I cannot do a "./configure" or "make clean".
MSYS have, but it not appropriate for building.

Can somebody explain step by step what I have to do to build newlisp from souce?

First: install TDM-GCC, ok, what next?
Title: Re: Build newLISP for win10 64bit
Post by: cameyo on November 20, 2023, 09:58:09 AM
Hello IVShilov,
I'm a little busy right now.
I'll try to compile newlisp 64 bit next week (I hope).
Ciao
Title: Re: Build newLISP for win10 64bit
Post by: cameyo on December 15, 2023, 07:11:18 AM
I've been busy a little longer...
But today I compiled newLISP 10.7.6
See instructions here:
https://github.com/cameyo42/newLISP-Note/blob/master/97-appendici.lsp#L3767
I only compiled the utf8-ffi version and did few tests.
Ciao
Title: Re: Build newLISP for win10 64bit
Post by: IVShilov on December 16, 2023, 11:13:24 AM
Thank you!