Quantcast

Problem with ranlib while running 'make install' for SDL

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Problem with ranlib while running 'make install' for SDL

Myles Prather
I'm having a very odd problem. Ranlib says it can't find a file that is clearly there. When I cd to the directory where the file is and run ranlib, it works fine. ???

smprather ~/SDL-1.2.13 % ls -l /usr/local/lib/libSDL.a
-rw-r--r-- 1 smprather None 1170920 Jul 18 15:56 /usr/local/lib/libSDL.a
smprather ~/SDL-1.2.13 % ranlib /usr/local/lib/libSDL.a
c:\MinGW\bin\ranlib.exe: '/usr/local/lib/libSDL.a': No such file
Exit 1
smprather ~/SDL-1.2.13 % cd /usr/local/lib/
smprather lib % ranlib libSDL.a

Any ideas?
Thanks,
--Myles
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with ranlib while running 'make install' for SDL

Greg Chicares-2
On 2009-07-18 21:03Z, Myles Prather wrote:

> I'm having a very odd problem. Ranlib says it can't find a file that is
> clearly there. When I cd to the directory where the file is and run ranlib,
> it works fine. ???
>
> smprather ~/SDL-1.2.13 % ls -l /usr/local/lib/libSDL.a
> -rw-r--r-- 1 smprather None 1170920 Jul 18 15:56 /usr/local/lib/libSDL.a
> smprather ~/SDL-1.2.13 % ranlib /usr/local/lib/libSDL.a
> c:\MinGW\bin\ranlib.exe: '/usr/local/lib/libSDL.a': No such file
> Exit 1
> smprather ~/SDL-1.2.13 % cd /usr/local/lib/
> smprather lib % ranlib libSDL.a

Are you still trying to mix Cygwin and MinGW? MinGW is a native
compiler; it doesn't understand Cygwin paths. And if you're
trying to link objects and libraries built with a mixture of
MinGW and Cygwin gcc, you may encounter worse problems later on
if you find a way around the path issues now.

Consider using either (MinGW + MSYS), or Cygwin, but not both.

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.

Most annoying abuses are:
1) Top posting
2) Thread hijacking
3) HTML/MIME encoded mail
4) Improper quoting
5) Improper trimming
_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with ranlib while running 'make install' for SDL

Keith Marshall-3
On Saturday 18 July 2009 22:38:04 Greg Chicares wrote:
> On 2009-07-18 21:03Z, Myles Prather wrote:

You are running a *native* MinGW ranlib from a Cygwin shell, right?

> > I'm having a very odd problem. Ranlib says it can't find a file
> > that is clearly there. When I cd to the directory where the file
> > is and run ranlib, it works fine. ???

There's absolutely nothing odd, or even unexpected in this, [in which
some lines appear to have run together, possibly as a result of HTML
posting; please configure your mailer to post plain text *only*]...

> > smprather ~/SDL-1.2.13 % ls -l /usr/local/lib/libSDL.a
> > -rw-r--r-- 1 smprather None 1170920 Jul 18 15:56
> > /usr/local/lib/libSDL.a smprather ~/SDL-1.2.13 % ranlib
> > /usr/local/lib/libSDL.a c:\MinGW\bin\ranlib.exe:
> > '/usr/local/lib/libSDL.a': No such file Exit 1

Here, you are passing a Cygwin path to a native application, which
expects a native Windows path.  Unless you've taken special care, in
your Cygwin installation, to make Cygwin's root directory, /, map to
the root of your current drive[*], d:\, (an unlikely scenario), then
the native application will simply interpret that Cygwin path as

  d:\usr\local\lib\libSDL.a

which almost certainly isn't what you want.  (Unlike MSYS, AFAIK
Cygwin's shell will *not* translate paths specified on the command
line to native equivalents, when invoking native applications).

[*] using "d:" here, as a generic substitute for whatever your actual
current drive may be.

> > smprather ~/SDL-1.2.13 % cd /usr/local/lib/
> > smprather lib % ranlib libSDL.a

Here, you are simply passing a file name, and leaving the native
application to find it in the current directory; there is no Cygwin
vs. native path confusion, and the file is where you've told the
application to look for it, so it works as expected.

> Are you still trying to mix Cygwin and MinGW? MinGW is a native
> compiler; it doesn't understand Cygwin paths. And if you're
> trying to link objects and libraries built with a mixture of
> MinGW and Cygwin gcc, you may encounter worse problems later on
> if you find a way around the path issues now.
>
> Consider using either (MinGW + MSYS), or Cygwin, but not both.

Sound advice, indeed.  However, it is possible to use MinGW tools
with complete success, from a Cygwin shell; (IIRC, it is how Aaron,
and Danny before him, built the MinGW-GCC tool chains).  It does,
however, require extreme care to avoid mixing native and Cygwin
libraries, and to pass paths in the proper native format.

--

Regards,
Keith.

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.

Most annoying abuses are:
1) Top posting
2) Thread hijacking
3) HTML/MIME encoded mail
4) Improper quoting
5) Improper trimming
_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with ranlib while running 'make install' for SDL

Myles Prather
Many points of order.

#1 Thank you both for taking the time to help out!
#2 I'm a hobbyist hacker that usually works with scripting languages
(Ruby) to avoid the headaches of compiled languages. Chasing C++ seg
faults in GTK2 (via gtkmm) code ran me away from compilers/gdb for
good. Point being: I'm a total amateur when it comes to the finer
points of compilation and linking. But as they say, I know just enough
to be dangerous :).
#3 I used Nabble to post from and had "Message is in HTML format"
not-checked, so I wrongly assumed it would send the message to the
list in plain text. Sorry. This one is directly from GMail and should
be in plain text.
#4 My goal was to just use Cygwin to "drive" MinGW, since I prefer to
work in a Maximal GNU/unix-type environment, not a MinimalSYStem. I
was definitely going to make sure all linking was done to the MinGW
native libraries. I was deginitely aware of the dangers.
#5 Yes, native ranlib from a Cygwin shell.
#6 I followed the directions in the MinGW FAQ for using Cygwin+MinGW.
The only thing it says to do there is to ensure c:\MinGW is in the
path in front of Cygwins gcc. I did that.
http://www.mingw.org/wiki/FAQ
#7 Now that I think about it, it makes sense that MinGW using native
Windows pathing would not be able to properly map to Cygwin paths.
Since MinGW was so tightly tied to the history of Cygwin, it didn't
even occur to me that the two had become decoupled in such a way.
#8 I think I'll stick to MSYS+Cygwin.
#9 My ultimate goal is to create a win32 (and 64??) Ruby gem for the
Rubygame library (which is backed by SDL). I also want to automate the
process as much as possible so I can easily create new releases each
time the Rubygame author drops new releases. It'll be interesting to
see how this goes. I suppose I can use my Windows install of Ruby for
all of my automation. Hopefully I can run MSYS-based sh scripts from
within win32-Ruby. My gut tells me this should work ok. FSM help me if
I'm ever forced to use Visual-C++ for anything. I already toyed around
with trying to run VC++ from a terminal. No thanks.

I would recommend that the MinGW FAQ be updated to warn against the
dangers/complications of MinGW+Cygwin. I was duped into thinking only
a massaged path was needed. Perhaps the FAQ's assumption is that most
readers are running higher wattages upstairs than myself. Fair enough.

Thanks again guys!
--Myles

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.

Most annoying abuses are:
1) Top posting
2) Thread hijacking
3) HTML/MIME encoded mail
4) Improper quoting
5) Improper trimming
_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Loading...