This is the mail archive of the 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: Trouble compiling with gcc 3.3.1-2

Thanks for the hand holding. I think I've nailed
the problem by running 'gcc -v'

It seemed to have been linking in an older version
of cygwin crt0.o, which was causing the trouble.

Thanks again!

> -----Original Message-----
> From: Larry Hall []
> Sent: Monday, October 13, 2003 7:24 PM
> To: Cygwin List;
> Subject: Re: Trouble compiling with gcc 3.3.1-2
> At 10:12 PM 10/13/2003, Larry Hall you wrote:
> >At 10:34 PM 10/13/2003, Pankaj K Garg you wrote:
> >>I'm having the following trouble compiling
> >>even the simplest programs with gcc:
> >>
> >>$ gcc tmp.c
> >>/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/libgcc.a(w32-shared-pt
> r.o)(.text+0x189): 
> >>undefined reference to `_pthread_atfork'
> >>collect2: ld returned 1 exit status
> >>
> >>The gcc version we are using is:
> >>$ gcc -v
> >>Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/specs
> >>Configured with: /netrel/src/gcc-3.3.1-2/configure 
> --enable-languages=c,c++,f77,
> >>java --enable-libgcj --enable-threads=posix 
> --with-system-zlib --enable-nls --wi
> >>thout-included-gettext --enable-interpreter 
> --enable-sjlj-exceptions --disable-v
> >>ersion-specific-runtime-libs --enable-shared 
> --build=i686-pc-linux --host=i686-p
> >>c-cygwin --target=i686-pc-cygwin --prefix=/usr 
> --exec-prefix=/usr --sysconfdir=/
> >>etc --libdir=/usr/lib --includedir=/nonexistent/include 
> --libexecdir=/usr/sbin
> >>Thread model: posix
> >>gcc version 3.3.1 (cygming special)
> >>
> >>Will appreciate any suggestions.
> >
> >
> >OK, sometimes persistence pays off (the rest of the time it 
> just p*sses
> >people off ;-) )
> >
> >If the installation of gcc and friends didn't work the first time, I 
> >suggest you reinstall.  But before you do that, I'd first recommend
> >you review /var/log/setup.log* to see if there's any hint there as to
> >why the installation didn't work the first time.  If this and/or the
> >reinstallation doesn't help, read 
<> and
>provide the information requested before sending any follow-up message
>to the list.  In particular, you should provide the "simple program".

OK, so you did provide the "simple program" in your first post.  I 
glossed over that.  However, it's not too much help since

int main(){return(0);}

compiles fine here.  Of course, I don't have the include file so I omitted
it from my test.  I'm guessing that's the source of your trouble.  Clearly, 
your attempt thinks it needs pthreads, though it's not clear why.  The rest 
of my original response still applies.  There really isn't any information 
that you've given that's helpful in tracking down your problem so you need 
to investigate a little more and report back with the specifics mentioned 
if you don't see the solution.

Larry Hall                    
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
838 Washington Street                   (508) 893-9889 - FAX
Holliston, MA 01746                     

Unsubscribe info:
Problem reports:

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