This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Compiling Cygwin on Linux


Below are the errors I received before I made their associated changes.
Dave Korn wrote:
Robert Eckhoff wrote on 05 April 2008 22:39:

directories. Winsup also had some source problems that I corrected.

~/cygwin-1.5.25-11/winsup/cygwin/winsup.h:276
-extern bool wsock_started;
+extern "C" bool wsock_started;

Before I made the change, Error:
/home/rpeckhoff/cygwin-1.5.25-11/winsup/cygwin/winsup.h:276: error: previous declaration of 'bool wsock_started' with 'C++' linkage
/home/rpeckhoff/cygwin-1.5.25-11/winsup/cygwin/autoload.cc:246: error: conflicts with new declaration with 'C' linkage


~/cygwin-1.5.25-11/winsup/cygwin/winsup.h:156
-extern int __api_fatal_exit_val;
+extern "C" int __api_fatal_exit_val;

~/cygwin-1.5.25-11/winsup/cygwin/environ.h:46
-extern char **__cygwin_environ, ***main_environ;
+extern "C" char **__cygwin_environ, ***main_environ;

i686-pc-cygwin-c++ -L/home/rpeckhoff/cygwin/i686-pc-cygwin/winsup -L/home/rpeckhoff/cygwin/i686-pc-cygwin/winsup/cygwin -L/home/rpeckhoff/cygwin/i686-pc-cygwin/winsup/w32api/lib -isystem /home/rpeckhoff/cygwin-1.5.25-11/winsup/include -isystem /home/rpeckhoff/cygwin-1.5.25-11/winsup/cygwin/include -isystem /home/rpeckhoff/cygwin-1.5.25-11/winsup/w32api/include -B/home/rpeckhoff/cygwin/i686-pc-cygwin/newlib/ -isystem /home/rpeckhoff/cygwin/i686-pc-cygwin/newlib/targ-include -isystem /home/rpeckhoff/cygwin-1.5.25-11/newlib/libc/include -c -nostdinc++ -DHAVE_CONFIG_H -O2 -g -O2 -MMD -fmerge-constants -ftracer -Wall -Wstrict-aliasing -Wwrite-strings -fno-common -pipe -fbuiltin -fmessage-length=0 -I. -I/home/rpeckhoff/cygwin-1.5.25-11/winsup/cygwin -I/home/rpeckhoff/cygwin-1.5.25-11/winsup/w32api/include -I/home/rpeckhoff/cygwin-1.5.25-11/winsup/cygwin/config/i386 -I/home/rpeckhoff/sysroot/usr/lib/gcc/i686-pc-cygwin/4.3.0/include -fno-rtti -fno-exceptions -o ./dcrt0.o /home/rpeckhoff/cygwin-1.5.25-11/winsup/cygwin/dcrt0.cc
/home/rpeckhoff/cygwin-1.5.25-11/winsup/cygwin/environ.h:46: error: previous declaration of 'char** __cygwin_environ' with 'C++' linkage
/home/rpeckhoff/cygwin-1.5.25-11/winsup/cygwin/dcrt0.cc:94: error: conflicts with new declaration with 'C' linkage
/home/rpeckhoff/cygwin-1.5.25-11/winsup/cygwin/environ.h:46: error: previous declaration of 'char*** main_environ' with 'C++' linkage
/home/rpeckhoff/cygwin-1.5.25-11/winsup/cygwin/dcrt0.cc:95: error: conflicts with new declaration with 'C' linkage
/home/rpeckhoff/cygwin-1.5.25-11/winsup/cygwin/winsup.h:156: error: previous declaration of 'int __api_fatal_exit_val' with 'C++' linkage
/home/rpeckhoff/cygwin-1.5.25-11/winsup/cygwin/dcrt0.cc:125: error: conflicts with new declaration with 'C' linkage



~/cygwin-1.5.25-11/winsup/cygwin/syscall.cc:3238
Uses goto's which breaks the build with gcc4.3. I rewrote the function
to use if statements.

What kind of problem does gcc4.3 have with gotos? There's nothing wrong with them in general and lots of other functions in that file have them, so maybe there's some underlying problem which is the actual thing that needs fixing?

cheers,
DaveK

The actual error is this:
i686-pc-cygwin-c++ -L/home/rpeckhoff/cygwin/i686-pc-cygwin/winsup -L/home/rpeckhoff/cygwin/i686-pc-cygwin/winsup/cygwin -L/home/rpeckhoff/cygwin/i686-pc-cygwin/winsup/w32api/lib -isystem /home/rpeckhoff/cygwin-1.5.25-11/winsup/include -isystem /home/rpeckhoff/cygwin-1.5.25-11/winsup/cygwin/include -isystem /home/rpeckhoff/cygwin-1.5.25-11/winsup/w32api/include -B/home/rpeckhoff/cygwin/i686-pc-cygwin/newlib/ -isystem /home/rpeckhoff/cygwin/i686-pc-cygwin/newlib/targ-include -isystem /home/rpeckhoff/cygwin-1.5.25-11/newlib/libc/include -c -nostdinc++ -DHAVE_CONFIG_H -O2 -g -O2 -MMD -fomit-frame-pointer -fmerge-constants -ftracer -Wall -Wstrict-aliasing -Wwrite-strings -fno-common -pipe -fbuiltin -fmessage-length=0 -I. -I/home/rpeckhoff/cygwin-1.5.25-11/winsup/cygwin -I/home/rpeckhoff/cygwin-1.5.25-11/winsup/w32api/include -I/home/rpeckhoff/cygwin-1.5.25-11/winsup/cygwin/config/i386 -I/home/rpeckhoff/sysroot/usr/lib/gcc/i686-pc-cygwin/4.3.0/include -fno-rtti -fno-exceptions -o ./syscalls.o /home/rpeckhoff/cygwin-1.5.25-11/winsup/cygwin/syscalls.cc
/home/rpeckhoff/cygwin-1.5.25-11/winsup/cygwin/syscalls.cc: In function 'FILE* popen(const char*, const char*)':
/home/rpeckhoff/cygwin-1.5.25-11/winsup/cygwin/syscalls.cc:3238: error: jump to label 'err'
/home/rpeckhoff/cygwin-1.5.25-11/winsup/cygwin/syscalls.cc:3230: error: from here
/home/rpeckhoff/cygwin-1.5.25-11/winsup/cygwin/syscalls.cc:3233: error: crosses initialization of 'fhandler_pipe* fh'
/home/rpeckhoff/cygwin-1.5.25-11/winsup/cygwin/syscalls.cc:3238: error: jump to label 'err'
/home/rpeckhoff/cygwin-1.5.25-11/winsup/cygwin/syscalls.cc:3210: error: from here
/home/rpeckhoff/cygwin-1.5.25-11/winsup/cygwin/syscalls.cc:3233: error: crosses initialization of 'fhandler_pipe* fh'
make[3]: *** [syscalls.o] Error 1


Thanks you for your help.
~Robert

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]