Compiling NEURON under WinXP

Post Reply
crepatas
Posts: 6
Joined: Wed Mar 15, 2006 10:26 am

Compiling NEURON under WinXP

Post by crepatas »

I tried to follow instructions and recompile NEURON. Unfortunately I have problems even with the first make of IV compilation.

This is the ./configure log:

Code: Select all

$ ./configure --prefix=`pwd`
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
CYGWIN=yes
checking for g++... g++
checking for C++ compiler default output file name... a.exe
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for a sed that does not truncate output... /usr/bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/i686-pc-cygwin/bin/ld.exe
checking if the linker (/usr/i686-pc-cygwin/bin/ld.exe) is GNU ld... yes
checking for /usr/i686-pc-cygwin/bin/ld.exe option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking how to recognise dependent libraries... file_magic ^x86 archive import|
^x86 DLL
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for gfortran... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 8192
checking command to parse /usr/bin/nm -B output from gcc object... ok
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/i686-pc-cygwin/bin/ld.exe
checking if the linker (/usr/i686-pc-cygwin/bin/ld.exe) is GNU ld... yes
checking whether the g++ linker (/usr/i686-pc-cygwin/bin/ld.exe) supports shared
 libraries... yestatic flag  works... yes
checking for g++ option to produce PIC... ceptions... no
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/i686-pc-cygwin/bin/ld.exe) supports shared
 libraries... yesthe gcc linker (/usr/i686-pc-cygwin/bin/ld.exe) supports shared
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes immediate
appending configuration tag "F77" to libtoolible... yes
checking whether the compiler implements namespaces... yes
checking whether the compiler has stringstream... yes
We are able to run a c++ program that uses streams
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for ANSI C header files... (cached) yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking osfcn.h usability... no
checking osfcn.h presence... no
checking for osfcn.h... no
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking for sys/stat.h... (cached) yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking stropts.h usability... no
checking stropts.h presence... no
checking for stropts.h... no
checking sys/conf.h usability... no
checking sys/conf.h presence... no
checking for sys/conf.h... no
 CYGWIN defined so make MSWwin version
checking for off_t... yes
checking for pid_t... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for uid_t in sys/types.h... yes
checking for working memcmp... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... yes
checking for working mmap... no
checking return type of signal handlers... void
checking for vprintf... yes
checking for _doprnt... no
checking for getcwd... yes
checking for gethostname... yes
checking for gettimeofday... yes
checking for regcomp... yes
checking for select... yes
checking for socket... yes
checking for strcspn... yes
checking for strerror... yes
checking for strtod... yes
checking for strtol... yes
checking for uname... yes
checking for prototype for gettimeofday... found
checking for type of signal functions... posix
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/bin/Makefile
config.status: creating src/bin/idemo/Makefile
config.status: creating src/bin/idraw/Makefile
config.status: creating src/bin/iclass/Makefile
config.status: creating src/include/Makefile
config.status: creating src/lib/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: creating src/include/ivstream.h
config.status: src/include/ivstream.h is unchanged

This is the error list when I invoke make:

Code: Select all

$ make
Making all in src
make[1]: Entering directory `/home/crepatas/neuron/iv/src'
Making all in lib
make[2]: Entering directory `/home/crepatas/neuron/iv/src/lib'
 g++ -DHAVE_CONFIG_H -I. -I. -I../include -g -O2 -c Dispatch/dispatcher.cpp -o D
ispatch/dispatcher.o
In file included from /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/ios
tream.h:31,
                 from ../include/ivstrm.h:44,
                 from ../include/ivstream.h:11,
                 from ./../../config.h:212,
                 from Dispatch/dispatcher.cpp:6:
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/backward_warning.h:32:2:
warning: #warning This file includes at least one deprecated or antiquated heade
r. Please consider using one of the 32 headers found in section 17.4.1.2 of the
C++ standard. Examples include substituting the <X> header for the <X.h> header
for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. T
o disable this warning use -Wno-deprecated.
In file included from Dispatch/dispatcher.cpp:39:
../include/Dispatch/dispatcher.h:95: error: `RETSIGTYPE' does not name a type
Dispatch/dispatcher.cpp: In member function `osboolean dpFdMask::anySet() const'
:
Dispatch/dispatcher.cpp:130: error: `ostrue' undeclared (first use this function
)
Dispatch/dispatcher.cpp:130: error: (Each undeclared identifier is reported only
 once for each function it appears in.)
Dispatch/dispatcher.cpp:132: error: `osfalse' undeclared (first use this functio
n)
Dispatch/dispatcher.cpp: In function `osboolean operator>(timeval, timeval)':
Dispatch/dispatcher.cpp:193: error: `ostrue' undeclared (first use this function
)
Dispatch/dispatcher.cpp:197: error: `osfalse' undeclared (first use this functio
n)
Dispatch/dispatcher.cpp: In function `osboolean operator<(timeval, timeval)':
Dispatch/dispatcher.cpp:203: error: `ostrue' undeclared (first use this function
)
Dispatch/dispatcher.cpp:207: error: `osfalse' undeclared (first use this functio
n)
Dispatch/dispatcher.cpp: In constructor `ChildQueue::ChildQueue()':
Dispatch/dispatcher.cpp:362: error: `osfalse' undeclared (first use this functio
n)
Dispatch/dispatcher.cpp: In member function `void ChildQueue::setStatus(pid_t, i
nt)':
Dispatch/dispatcher.cpp:412: error: `ostrue' undeclared (first use this function
)
Dispatch/dispatcher.cpp: In member function `void ChildQueue::notify()':
Dispatch/dispatcher.cpp:431: error: `osfalse' undeclared (first use this functio
n)
Dispatch/dispatcher.cpp: In member function `virtual osboolean dpDispatcher::set
Ready(int, dpDispatcher::DispatcherMask)':
Dispatch/dispatcher.cpp:563: error: `osfalse' undeclared (first use this functio
n)
Dispatch/dispatcher.cpp:574: error: `ostrue' undeclared (first use this function
)
Dispatch/dispatcher.cpp: At global scope:
Dispatch/dispatcher.cpp:656: error: `RETSIGTYPE' does not name a type
Dispatch/dispatcher.cpp: In member function `virtual int dpDispatcher::waitFor(d
pFdMask&, dpFdMask&, dpFdMask&, timeval*)':
Dispatch/dispatcher.cpp:729: error: `sigCLD' is not a member of `dpDispatcher'
Dispatch/dispatcher.cpp:753: error: invalid conversion from `void (*)()' to `voi
d (*)(int)'
Dispatch/dispatcher.cpp:753: error:   initializing argument 2 of `void (* signal
(int, void (*)(int)))(int)'
Dispatch/dispatcher.cpp: In member function `virtual osboolean dpDispatcher::han
dleError()':
Dispatch/dispatcher.cpp:828: error: `ostrue' undeclared (first use this function
)
Dispatch/dispatcher.cpp:840: error: `osfalse' undeclared (first use this functio
n)
make[2]: *** [Dispatch/dispatcher.lo] Error 1
make[2]: Leaving directory `/home/crepatas/neuron/iv/src/lib'
Making all in include
make[2]: Entering directory `/home/crepatas/neuron/iv/src/include'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/crepatas/neuron/iv/src/include'
Making all in bin
make[2]: Entering directory `/home/crepatas/neuron/iv/src/bin'
Making all in idemo
make[3]: Entering directory `/home/crepatas/neuron/iv/src/bin/idemo'
g++ -DHAVE_CONFIG_H -I. -I. -I../../include   -g -O2 -c -o main.o main.cpp
In file included from /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/ios
tream.h:31,
                 from ../../include/ivstrm.h:44,
                 from ../../include/ivstream.h:11,
                 from ../../include/../../config.h:212,
                 from main.cpp:2:
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/backward/backward_warning.h:32:2:
warning: #warning This file includes at least one deprecated or antiquated heade
r. Please consider using one of the 32 headers found in section 17.4.1.2 of the
C++ standard. Examples include substituting the <X> header for the <X.h> header
for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. T
o disable this warning use -Wno-deprecated.
In file included from main.cpp:36:
../../include/InterViews/display.h:90: error: `osfalse' was not declared in this
 scope
main.cpp: In member function `int App::run(int, char**)':
main.cpp:273: error: `osfalse' undeclared (first use this function)
main.cpp:273: error: (Each undeclared identifier is reported only once for each
function it appears in.)
main.cpp:287: error: `ostrue' undeclared (first use this function)
main.cpp: In member function `ivMenu* App::menubar()':
main.cpp:444: error: `osfalse' undeclared (first use this function)
make[3]: *** [main.o] Error 1
make[3]: Leaving directory `/home/crepatas/neuron/iv/src/bin/idemo'
make[2]: Leaving directory `/home/crepatas/neuron/iv/src/bin'
make[1]: Leaving directory `/home/crepatas/neuron/iv/src'


Thanks
crepatas
Posts: 6
Joined: Wed Mar 15, 2006 10:26 am

Post by crepatas »

hines wrote: If there is any demand, then perhaps I can supply an appropriate setup.exe
someday.
PS: it would be great to have a setup.exe with multi processor support for WinXP. I'm sure a significant amount of people either have Pentium 4 with Hyperthreads activated or some of the latest dual-core CPU. In my tests activating hyperthread provide me a 10-15% in performance increase.
hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Post by hines »

Dispatch/dispatcher.cpp:130: error: `ostrue' undeclared (first use this function
)
Are you sure you downloaded:
http://www.neuron.yale.edu/ftp/neuron/v ... -17.tar.gz
I saw the same problem on a linux machine today and it was due to having an old version.

Also
Dispatch/dispatcher.cpp:656: error: `RETSIGTYPE' does not name a type
but in the configure output it states:
checking return type of signal handlers... void
which makes me wonder about the
config.h file configure generated. Look at that and tell me what is the line is instead of

Code: Select all

* Define as the return type of signal handlers (`int' or `void'). */
#define RETSIGTYPE void
crepatas
Posts: 6
Joined: Wed Mar 15, 2006 10:26 am

Post by crepatas »

In my config.h there is no #define RETSIGTYPE void

This is my config.h:

Crepatas
PS: I redownloaded the iv-17, unzipped with winzip under Winxp and ran:
./configure --prefix=`pwd`

Code: Select all

/* config.h.  Generated by configure.  */
/* config.h.in.  Generated from configure.in by autoheader.  */





#ifndef H_config_included

#define H_config_included 1





/* define if using cygwin */

/* #undef CYGWIN */



/* use sigsetmask */

/* #undef HAVE_BSD_SIGNALS */



/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.

   */

/* #undef HAVE_DIRENT_H */



/* Define to 1 if you have the <dlfcn.h> header file. */

/* #undef HAVE_DLFCN_H */



/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */

/* #undef HAVE_DOPRNT */



/* Define to 1 if you have the <fcntl.h> header file. */

/* #undef HAVE_FCNTL_H */



/* Define to 1 if you have the `getcwd' function. */

/* #undef HAVE_GETCWD */



/* Define to 1 if you have the `gethostname' function. */

/* #undef HAVE_GETHOSTNAME */



/* Define to 1 if you have the `getpagesize' function. */

/* #undef HAVE_GETPAGESIZE */



/* Define to 1 if you have the `gettimeofday' function. */

/* #undef HAVE_GETTIMEOFDAY */



/* Define to 1 if you have the <inttypes.h> header file. */

/* #undef HAVE_INTTYPES_H */



/* Define to 1 if you have the <malloc.h> header file. */

/* #undef HAVE_MALLOC_H */



/* Define to 1 if you have the <memory.h> header file. */

/* #undef HAVE_MEMORY_H */



/* Define to 1 if you have a working `mmap' system call. */

/* #undef HAVE_MMAP */



/* define if the compiler implements namespaces */

/* #undef HAVE_NAMESPACES */



/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */

/* #undef HAVE_NDIR_H */



/* Define to 1 if you have the <osfcn.h> header file. */

/* #undef HAVE_OSFCN_H */



/* use sigprocmask */

/* #undef HAVE_POSIX_SIGNALS */



/* Define to 1 if you have the `regcomp' function. */

/* #undef HAVE_REGCOMP */



/* Define to 1 if you have the `select' function. */

/* #undef HAVE_SELECT */



/* Define to 1 if you have the `socket' function. */

/* #undef HAVE_SOCKET */



/* define if the compiler has stringstream */

/* #undef HAVE_SSTREAM */



/* Define to 1 if you have the <stdint.h> header file. */

/* #undef HAVE_STDINT_H */



/* Define to 1 if you have the <stdlib.h> header file. */

/* #undef HAVE_STDLIB_H */



/* Define to 1 if you have the `strcspn' function. */

/* #undef HAVE_STRCSPN */



/* Define to 1 if you have the <stream.h> header file. */

/* #undef HAVE_STREAM_H */



/* Define to 1 if you have the `strerror' function. */

/* #undef HAVE_STRERROR */



/* Define to 1 if you have the <strings.h> header file. */

/* #undef HAVE_STRINGS_H */



/* Define to 1 if you have the <string.h> header file. */

/* #undef HAVE_STRING_H */



/* Define to 1 if you have the <stropts.h> header file. */

/* #undef HAVE_STROPTS_H */



/* Define to 1 if you have the `strtod' function. */

/* #undef HAVE_STRTOD */



/* Define to 1 if you have the `strtol' function. */

/* #undef HAVE_STRTOL */



/* Define to 1 if you have the <sys/conf.h> header file. */

/* #undef HAVE_SYS_CONF_H */



/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.

   */

/* #undef HAVE_SYS_DIR_H */



/* Define to 1 if you have the <sys/file.h> header file. */

/* #undef HAVE_SYS_FILE_H */



/* Define to 1 if you have the <sys/ioctl.h> header file. */

/* #undef HAVE_SYS_IOCTL_H */



/* Define to 1 if you have the <sys/mman.h> header file. */

/* #undef HAVE_SYS_MMAN_H */



/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.

   */

/* #undef HAVE_SYS_NDIR_H */



/* Define to 1 if you have the <sys/select.h> header file. */

/* #undef HAVE_SYS_SELECT_H */



/* Define to 1 if you have the <sys/stat.h> header file. */

/* #undef HAVE_SYS_STAT_H */



/* Define to 1 if you have the <sys/time.h> header file. */

/* #undef HAVE_SYS_TIME_H */



/* Define to 1 if you have the <sys/types.h> header file. */

/* #undef HAVE_SYS_TYPES_H */



/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */

/* #undef HAVE_SYS_WAIT_H */



/* Define to 1 if you have the `uname' function. */

/* #undef HAVE_UNAME */



/* Define to 1 if you have the <unistd.h> header file. */

/* #undef HAVE_UNISTD_H */



/* use sigset */

/* #undef HAVE_USG_SIGHOLD */



/* Define to 1 if you have the `vprintf' function. */

/* #undef HAVE_VPRINTF */



/* define if ostrue should be declared */

/* #undef IVOS_DECLARE_TRUE */



/* undefined or ::fabs or std::fabs */

/* #undef IVOS_FABS */



/* do we need the prototype for gettimeofday */

/* #undef NEED_GETTIMEOFDAY_PROTOTYPE */



/* define if stream.h is isufficient by itself */

/* #undef NO_OUTPUT_OPENMODE */



/* Define to the address where bug reports for this package should be sent. */

/* #undef PACKAGE_BUGREPORT */



/* Define to the full name of this package. */

/* #undef PACKAGE_NAME */



/* Define to the full name and version of this package. */

/* #undef PACKAGE_STRING */



/* Define to the one symbol short name of this package. */

/* #undef PACKAGE_TARNAME */



/* Define to the version of this package. */

/* #undef PACKAGE_VERSION */



/* Define as the return type of signal handlers (`int' or `void'). */

/* #undef RETSIGTYPE */



/* Define to 1 if you have the ANSI C header files. */

/* #undef STDC_HEADERS */



/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */

/* #undef TIME_WITH_SYS_TIME */



/* Define to 1 if your <sys/time.h> declares `struct tm'. */

/* #undef TM_IN_SYS_TIME */



/* Define to 1 if the X Window System is missing or not being used. */

/* #undef X_DISPLAY_MISSING */



/* Define to `int' if <sys/types.h> doesn't define. */

/* #undef gid_t */



/* Define to `long' if <sys/types.h> does not define. */

/* #undef off_t */



/* Define to `int' if <sys/types.h> does not define. */

/* #undef pid_t */



/* Define to `unsigned' if <sys/types.h> does not define. */

/* #undef size_t */



/* Define to `int' if <sys/types.h> doesn't define. */

/* #undef uid_t */





#if defined(__cplusplus)

#include <ivstream.h>

#endif



#if defined(CYGWIN)

#define WIN32 1

#endif



#if defined(carbon)

#include <Carbon/Carbon.h>

#endif



#endif /* H_config_included */




hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Post by hines »

Not a single thing is defined in your config.h file. It is merely a copy of config.h.in . Try the following test.

Code: Select all

mv config.h config.h.old
./configure --prefix=`pwd`
and see if there is any difference between the new config.h and the config.h.old
Raj
Posts: 220
Joined: Thu Jun 09, 2005 1:09 pm
Location: Groningen, The Netherlands
Contact:

Post by Raj »

Michael, Crepatas,

With the 1415 alpha version I have exactly the same problem Crepatas found . The IV version that came with 5.8.88 is building without problems, probably ruling out a different version of Cygwin as a cause. When I use the config.h file generated for iv-17(5.8.88) to build iv-17(5.9/1415) it builds without warnings and idemo runs smoothly.

Running configure for nrn leads to the same problem. Config.h shows no sign of picking up the Cygwin specific settings or any setting at all, in this case copying the config.h does not help, not unexpectedly as the neuron code has undergone real changes whereas for iv it seems it was only the buildprocess that saw a few changes. Again nrn 5.8.88 configures as expected and is built normally.

Details:
- Cygwin version: CYGWIN_NT-5.0 1.5.19(0.150/4/2) 2006-01-20 13:28
- OS: Windows 2000 (Fully patched)
- configure options just: --prefix=`pwd`
- I'm not building for parallel development
hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Post by hines »

try again with the latest alpha version. I've been in the process of switching from cvs to subversion and it has taken a while to get some of the administrative scripts ironed out. I just built on mswin from a clean directory using the tar.gz file.
Raj
Posts: 220
Joined: Thu Jun 09, 2005 1:09 pm
Location: Groningen, The Netherlands
Contact:

Post by Raj »

Unzipping with Winzip I run into the same problem again, but using tar xzf I seem to have a build and at least there is now a reasonable config.h.
Post Reply