Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - GrammatonCleric

#1
newLISP and the O.S. / I think I figured it out...
September 09, 2007, 05:35:46 PM
Gentlemen,



Thanks for looking m35, turns out it doesn't really seem to be a MSYS/MinGW configuration problem after all.



I am somewhat embarrassed to admit it, but my initial examination of the newLISP files and whether they included time.h was somewhat cursory. time.h is actually included in four files in the newLISP file set: newlisp.h, nl-sock.c, nl-web.c, and win32-util.c.  So what I did was this.



Seeing as that the compile errors were coming from timezone and gettimeofday redefinitions in the source code and that newlisp.h includes time.h, I surrounded the offending timezone and gettimeofday declarations like so:


#ifndef WIN_32
struct timezone
{
int tz_minuteswest;
int tz_dsttime;
};

int gettimeofday( struct timeval *tp, struct timezone *tzp );
#endif


This enabled me to complie to newlisp.exe and run qa-dot successfully on WinXP SP2 using the Netbeans 5.5.1 IDE and the MSYS/MinGW toolset:





$ newlisp qa-dot



Testing built-in functions ...



...



ALL FUNCTIONS FINISHED SUCCESSFULL: C:msys1.0homedouglas polsonnewlisp-9.2.0newlisp.exe



total time: 9343







Make sense?



GC
#2
m35,



I'm curious, what are the versions of make and gcc in your laptop MSYS/MinGW installation versus those in your more recent installation of MSYS/MinGW on your desktop, are they different?



My MSYS/MinGW installation uses the 3.79.1 make and the 3.4.5 version of gcc, does your 'lappy' use older or different versions of these tools?



Are there any other configuration files or differences in tool versions that you can see?



I spent some time looking at the newLISP files this morning, and you know, none of them actually include "time.h" that I could see, hence, the error:



nl-filesys.c:62: error: redefinition of `struct timezone'.

nl-filesys.c:67: error: conflicting types for 'gettimeofday'

c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/sys/time.h:40: error: previous declaration of 'gettimeofday' was here





This of course shouldn't happen normally, as no file should be included unless specifically called for, so it must be, I would think, a configuration error somewhere in MSYS/MinGW. If I can figure out why MSYS/MinGW is doing this, I'll let you know...



GC
#3
Hey all,



I can't help but think this must be some sort of configuration problem with how MSYS/MinGW is set up on my machine, as I have built newLISP before (newLISP 9.1.0 on openSUSE 10.2) without this kind of trouble, so, if I can figure out what the deal is, I'll let you know...



GC
#4
newLISP and the O.S. /
September 07, 2007, 08:16:40 PM
Lutz, m35, & Maurizio,



Thanks guys.



Lutz, since I did use MinGw-5.1.3.exe to install MSYS-MinGW, I'll try what you said, as far as how I invoke make, apparently mingw32-make is considered somewhat deficient in function...





BTW, I noticed that Maurizio was getting exactly the same errors I am, so if all else fails, I suppose I can try his approach...



Thanks again,

GC
#5
Thanks Lutz,



I was thrown off when I saw the compile errors and the IDE had flagged those particular #include entires in nl_filesys.c .  However, I still got errors when I tried to 'mingw32-make -f Makefile mingw' from the MSYS command line.  I'm not entirely sure if I've got all that stuff (MSYS/MinGW) put together right.  I can't expect you to debug my MinGW installation, but I was wondering if you could point me to someplace where I can get good information on just how to set all that up.



Thnx,



GC
#6
I've been trying to build newLISP 9.2 on WinXP Pro on top of the  MinGW/MSYS  runtime using the NetBeans 5.5.1 IDE c/c++ 'make configuration' support.  



When compiling nl_filesys.c, a number of header files cannot be found (sys/ipc.h, sys/sem.h, sys/mman.h, sys/ioctl.h, & sys/socket.h), as well as various complaints concerning the redefintion of `struct timezone' and conflicting types for 'gettimeofday'.



I just installed MinGw/MSYS this last week using the MinGW 5.1.3 installer which in turn installed the MinGW-3.13 runtime, gcc-core-3.4.5, gcc-g++-3.4.5, MSYS-1.0.10., w32api-3.1.0, binutils-2.16.91, and minggw-make-3.81.2.  I can't find any of the listed header files in any of the MinGW/MSYS directories.



What else do I need to do to make this work?