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: Help: gcc problem in Cygwin!


Hi, Larry,

Thanks again for your suggestions!

Since I run './configure' first, and which generates
the makefile for 'make', I digged into the configure
file and found this:

--------------------------------------------------
  cygwin* | mingw* | pw32*)
    # When not using gcc, we currently assume that we
are using
    # Microsoft Visual C++.
    # hardcode_libdir_flag_spec is actually
meaningless, as there is
    # no search path for DLLs.
    hardcode_libdir_flag_spec=' '
    allow_undefined_flag=unsupported
    # Tell ltmain to make .lib files, not .a files.
    libext=lib
    # FIXME: Setting linknames here is a bad hack.
    archive_cmds='$CC -o $lib $libobjs $compiler_flags
`echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link
-dll~linknames='
    # The linker will automatically build a .lib file
if we build a DLL.
    old_archive_from_new_cmds='true'
    # FIXME: Should let the user specify the lib
program.
    old_archive_cmds='lib
/OUT:$oldlib$oldobjs$old_deplibs'
    fix_srcfile_path='`cygpath -w "$srcfile"`'
    ;;
-----------------------------------------------------

As you can see, the second to bottom line calls for
'cygpath', and the variable 'fix_srcfile_path' is
called later like this:

-----------------------------------------------------
# Fix the shell variable \$srcfile for the compiler.
fix_srcfile_path="$fix_srcfile_path"
-----------------------------------------------------

I couldn't find the definition of the shell variable
'$srcfile' through the whole file. Is it using a
default value or something like that? Do you think
this is the reason that 'cygpath' been invoked with an
empty path? If so, how to fix it? If not, what else? 

Really appreciate your time and help!
(BTW, I attach the configure file just in case you
want to take a look.)

Best,
Frank


--- "Larry Hall (Cygwin)"
<reply-to-list-only-lh@cygwin.com> wrote:

> <http://cygwin.com/acronyms/#TOFU>.  Reformatted.
> 
> Frank C. wrote:
> > --- "Larry Hall (Cygwin)"
> > <reply-to-list-only-lh at cygwin dot com> wrote:
>     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> <http://cygwin.com/acronyms/#PCYMTNQREAIYR>. 
> Thanks.
> 
> > 
> >> Frank C. wrote:
> >>> Dear all,
> >>>
> >>> I've been trying to install a software on Cygwin
> >> under
> >>> Windows XP, but without any success. The steps
> are
> >> (1)
> >>> './configure', and (2) 'make'.
> >>>
> >>> I had following error message after running
> >> 'make'.
> >>> cygpath: can't convert empty path
> >>>
> >
>
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libcygwin.a(libcmain.o)
> >>> :: undefined reference to '_WinMain@16'
> >>> collect2: ld returned 1 exit status
> >>> make: *** [libquicknet3.a] Error 1
> >>>
> >>>
> >>> Can anyone let me know what's wrong here? It
> seems
> >>> that there is a confusion on which linker to use
> >> for
> >>> gcc, and GNU ld is not on the path. I attach the
> >>> output from './configure' at the end. Do you
> think
> >> it
> >>> is related to those outputs? If so, how to fix
> it?
> >> If
> >>> not, what's the cause?
> >>> checking for ld used by GCC... ${CXX}
> >>> checking if the linker (${CXX}) is GNU ld... no
> >>>
> >>
> >>
> >> Make sure you've installed the 'binutils' package
> >> and that
> >> 'ld' from this package is in your path.  If this
> >> doesn't
> >> resolve the problem, then please read and follow
> the
> >> problem
> >> reporting guidelines found here:
> >>
> >>> Problem reports:      
> >> http://cygwin.com/problems.html
> >>
> >>
> >>
> >> -- 
> >> Larry Hall                             
> >> http://www.rfk.com
> >> RFK Partners, Inc.                      (508)
> >> 893-9779 - RFK Office
> >> 216 Dalton Rd.                          (508)
> >> 893-9889 - FAX
> >> Holliston, MA 01746
> >>
> >> --
> >> 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/
> >>
> > Larry,
> > 
> > Thanks for your quick reply!
> > 
> > I installed the latest version of Cygwin, and
> almost
> > all packages which includes 'binutils' package. I
> > checked and found 'ld' in the path: (1)
> > cygwin\bin\ld.exe (678 kb), and (2)
> > cygwin\usr\i686-pc-cygwin\bin\ld.exe (1 kb). Is
> this
> > normal?
> 
> 
> Yes, that's normal.  The latter is a symbolic link
> to the former.
> 
> 
> > I did a quick search on the list and couldn't find
> > exact answer to my question.
> > 
> > Do you have any more thoughts? Thanks!
> 
> 
> OK, this looks like it must be a configure problem
> then.  'cygpath'
> is apparently being invoked by the script with an
> empty path.  If
> you can narrow down where in this script that this
> is happening,
> you should have more luck determining why this is
> the case and how
> to resolve it.  My WAG is that it's resolving some
> environment variable
> or path that doesn't actually exist.  But I can't
> say more without
> further details.
> 
> HTH,
> 
> 
> -- 
> Larry Hall                             
> http://www.rfk.com
> RFK Partners, Inc.                      (508)
> 893-9779 - RFK Office
> 216 Dalton Rd.                          (508)
> 893-9889 - FAX
> Holliston, MA 01746
> 
> --
> 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/
> 
> 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Attachment: configure
Description: 2170792853-configure

--
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]