Problems to compile SDL* under GNU Win32 compilers

Hello to all,

First, I would like to apology for the long post : 4 Ko (boring) text + 3
Ko included gzipped (useless) files. Please ignore my bad english too.

I try to recompile the SDL-1.2.2 and some of its `associated’ libraries,
like SDL_image-1.2.0, under the Cygnus Cygwin B20 environnement which
provide the egcs-2.91.57 compiler under Win32 systems, and all the shell
(bash) and unix-like environnement that usually make easy the port from/to
linux/unix. Both host and system type are i586-pc-cygwin (uname says
"CYGWIN_98-4.10"). The cygwin compiler is a modified MingW32 compiler, and
all that follows will unhesitatingly apply to the MinGW32 compiler.

The reason I want to recompile these libraries is that if you wanna use
them into your programs, you must have respective .lib files, but GNU Win32
compilers require .a (and .la) files instead, and the latter ones are almost
never supplied (the exception is SDL itself). Am I wrong ? So you must make
them yourself.

After a few try-error cycles with the configure script, I understood two
things :

  1. In some case, configure can’t find some gnu programs even if you’ve got
    then on the path. I Dunno why. You should :
    a) Either set variables under DOS. A good method is to write the following
    code into cygnus.bat (where point the quick link of the start bar), just
    before the “bash” command. This way you won’t have to set them again.
    <<>>
    SET CC=gcc
    SET LD=ld
    SET DLLTOOL=dlltool
    SET AS=as
    SET OBJDUMP=objdump
    <<>>
    b) Or export from inside the bash shell, but you’ll need to do it
    everytime you run the shell. Type the following code from the shell
    command-line.
    <<>>
    export CC=gcc
    export LD=ld
    export DLLTOOL=dlltool
    export AS=as
    export OBJDUMP=objdump
    <<>>

  2. I have found a `bug’ in the configure file: the executable extension
    isn’t “.exe”. To fix it :
    Edit ./configure with your favorite editor.
    Find the following line (#615 in SDL-1.2.2 main dir, #545 in SDL_image-1.2.0
    main dir) :
    <<>>
    ac_exeext=
    <<>>
    Change it to :
    <<>>
    ac_exeext=".exe"
    <<>>

    But after all this, I still can’t compile the libraries. I can’t even
    have a makefile to look and hack. For example: SDL-1.2.2. I provide with the
    generated config.log, plus the file makingof.exe generated by “./configure >
    makingof.txt 2>&1”, both are gzipped. Look at the latter. At the lines
    #46-104, there is a lot of sed errors (caused by the sed expression line
    #2781), but I can’t see the reason since I’m not a sed expert. Then at lines
    #137-260, there is also a lot of sed errors (caused by the sed expression
    lines #9518-9523), and creation of all Makefile; a `big’ problem is that all
    these makefiles are empty, as do SDL.spec and sdl-config files. Isn’t that
    weird ?!

    Well, can the maintainers of the Makefile.* have a look at all this, may
    he could save us. Maybe it’s a larger problem than the one we can see, it
    may be an autotool problem, or worse… Please H-E-L-P !, as Leeloo said.

    Otherwise there is another solution (the easy way, the evil one): try to
    supply the .a (and .la) files within the SDL* packages, as best as the
    packages maintainers could. It shouldn’t be difficult since the one that
    compiles under Linux would merely compiles under Linux with XMinGW32
    cross-compiler.

    Think it over, and give some suggestions. Thanks for support anyway.

Best regards,
IoDream.

P.S.: Where can I find the DX5 headers (needed to compile SDL with DX
suppot) ? I don’t know if Microsoft has still them on its website; if not,
you should include them on libsdl.org. On the other hand, if I’ve got DX7 or
DX8 headers, do you think I use them in place of it ? (sorry, I can’t do
beta-testing on it, seeing that I’m not a DX programmer, I would surely make
a mistake and unintentionally mislead you)

P.S.2;):(Off topic) Hey Sam, may you explain where does your Loki’s nickname
"Hercules" come from (wishing you don’t get annoyed with me) ?
-------------- next part --------------
A non-text attachment was scrubbed…
Name: config.log.gz
Type: application/octet-stream
Size: 1616 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20010818/1f9175fd/attachment.obj
-------------- next part --------------
A non-text attachment was scrubbed…
Name: makingof.txt.gz
Type: application/octet-stream
Size: 1467 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20010818/1f9175fd/attachment-0001.obj

Jo wrote:

linux/unix. Both host and system type are i586-pc-cygwin (uname says
"CYGWIN_98-4.10"). The cygwin compiler is a modified MingW32 compiler, and
all that follows will unhesitatingly apply to the MinGW32 compiler.

gasp that part about the history of mingw is er simply the other
way round - the mingw compiler is an offspring of cygwin, but it did
split off completly from the cygwin-mailinglists at some point which
is some years ago http://www.mingw.org/history.shtml - while cygwin b20.1
had been released back in 1998, the mingw-compilers are usually much
more up to date - see files at mingw.org to use gcc-2.95.3, latest w32api
snapshot, newest binutils (very important!) and other stuff. Same for
the compiler packages from http://libsdl.org/Xmingw32. Anyway, IIRC
SDL had been made cygwin-ready just recently but I didn’t follow closely.
May be digging through the ML-archives may bring up some hints.

may be someone else can be of more help,
I was just to correct that mingw info…
cheers,
– guido Edel sei der Mensch, hilfreich und gut
GCS/E/S/P C++$++++ ULHS L++w- N++@ d(±) s+a- r+@>+++ y++ 5++X- (geekcode)

“Jo” a ?crit dans le message news:
mailman.998168104.25427.sdl at libsdl.org

 Hello to all,

First, I would like to apology for the long post : 4 Ko (boring) text +
3
Ko included gzipped (useless) files. Please ignore my bad english too.

I try to recompile the SDL-1.2.2 and some of its `associated’
libraries,
like SDL_image-1.2.0, under the Cygnus Cygwin B20 environnement which
provide the egcs-2.91.57 compiler under Win32 systems, and all the shell
(bash) and unix-like environnement that usually make easy the port from/to
linux/unix. Both host and system type are i586-pc-cygwin (uname says
"CYGWIN_98-4.10"). The cygwin compiler is a modified MingW32 compiler, and
all that follows will unhesitatingly apply to the MinGW32 compiler.

The reason I want to recompile these libraries is that if you wanna use
them into your programs, you must have respective .lib files, but GNU
Win32
compilers require .a (and .la) files instead, and the latter ones are
almost
never supplied (the exception is SDL itself). Am I wrong ? So you must
make
them yourself.

try to simply change the name blabla.lib into blabla.a, it should works !

After a few try-error cycles with the configure script, I understood
two
things :

  1. In some case, configure can’t find some gnu programs even if you’ve got
    then on the path. I Dunno why. You should :
    a) Either set variables under DOS. A good method is to write the
    following
    code into cygnus.bat (where point the quick link of the start bar), just
    before the “bash” command. This way you won’t have to set them again.
    <<>>
    SET CC=gcc
    SET LD=ld
    SET DLLTOOL=dlltool
    SET AS=as
    SET OBJDUMP=objdump
    <<>>
    b) Or export from inside the bash shell, but you’ll need to do it
    everytime you run the shell. Type the following code from the shell
    command-line.
    <<>>
    export CC=gcc
    export LD=ld
    export DLLTOOL=dlltool
    export AS=as
    export OBJDUMP=objdump
    <<>>

  2. I have found a `bug’ in the configure file: the executable extension
    isn’t “.exe”. To fix it :
    Edit ./configure with your favorite editor.
    Find the following line (#615 in SDL-1.2.2 main dir, #545 in
    SDL_image-1.2.0
    main dir) :
    <<>>
    ac_exeext=
    <<>>
    Change it to :
    <<>>
    ac_exeext=".exe"
    <<>>

    But after all this, I still can’t compile the libraries. I can’t even
    have a makefile to look and hack. For example: SDL-1.2.2. I provide with
    the
    generated config.log, plus the file makingof.exe generated by "./configure

makingof.txt 2>&1", both are gzipped. Look at the latter. At the lines
#46-104, there is a lot of sed errors (caused by the sed expression line
#2781), but I can’t see the reason since I’m not a sed expert. Then at
lines
#137-260, there is also a lot of sed errors (caused by the sed expression
lines #9518-9523), and creation of all Makefile; a `big’ problem is that
all
these makefiles are empty, as do SDL.spec and sdl-config files. Isn’t that
weird ?!

Well, can the maintainers of the Makefile.* have a look at all this,
may
he could save us. Maybe it’s a larger problem than the one we can see, it
may be an autotool problem, or worse… Please H-E-L-P !, as Leeloo said.

Otherwise there is another solution (the easy way, the evil one): try
to
supply the .a (and .la) files within the SDL* packages, as best as the
packages maintainers could. It shouldn’t be difficult since the one that
compiles under Linux would merely compiles under Linux with XMinGW32
cross-compiler.

Think it over, and give some suggestions. Thanks for support anyway.

Best regards,
IoDream.

P.S.: Where can I find the DX5 headers (needed to compile SDL with DX
suppot) ? I don’t know if Microsoft has still them on its website; if not,
you should include them on libsdl.org. On the other hand, if I’ve got DX7
or
DX8 headers, do you think I use them in place of it ? (sorry, I can’t do
beta-testing on it, seeing that I’m not a DX programmer, I would surely
make
a mistake and unintentionally mislead you)

P.S.2;):(Off topic) Hey Sam, may you explain where does your Loki’s
nickname> “Hercules” come from (wishing you don’t get annoyed with me) ?

The reason I want to recompile these libraries is that if you wanna
use them into your programs, you must have respective .lib files, but GNU
Win32
compilers require .a (and .la) files instead, and the latter ones are
almost
never supplied (the exception is SDL itself). Am I wrong ? So you must
make
them yourself.

try to simply change the name blabla.lib into blabla.a, it should works !

I don ?t compile under windows, but I herad of a tool called reimp
that converts *.lib to *.a files.

http://www.acc.umu.se/~anorland/gnu-win32/On Sunday 19 August 2001 19:16, Bille2 wrote:


Johannes Schmidt

< http://libufo.sourceforge.net >
< http://m31.sourceforge.net >

OK thanks I’ll have a look, and as soon as I can I’ll tell you more.

Best regards,
IoDream.

-----Message d’origine-----De : sdl-admin at libsdl.org [mailto:sdl-admin at libsdl.org]De la part de
Johannes Schmidt
Envoy? : lundi 20 ao?t 2001 12:02
? : sdl at libsdl.org
Objet : Re: [SDL] Problems to compile SDL* under GNU Win32 compilers.

On Sunday 19 August 2001 19:16, Bille2 wrote:

The reason I want to recompile these libraries is that if you wanna
use them into your programs, you must have respective .lib files, but
GNU

Win32
compilers require .a (and .la) files instead, and the latter ones are
almost
never supplied (the exception is SDL itself). Am I wrong ? So you must
make
them yourself.

try to simply change the name blabla.lib into blabla.a, it should works
!

I don ?t compile under windows, but I herad of a tool called reimp
that converts *.lib to *.a files.

http://www.acc.umu.se/~anorland/gnu-win32/


Johannes Schmidt

< http://libufo.sourceforge.net >
< http://m31.sourceforge.net >


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


ifrance.com, l’email gratuit le plus complet de l’Internet !
vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP…
http://www.ifrance.com/_reloc/email.emailif

Hi all,

In my previous mail, I did a little mistake: the two errors were caused
by line #2781
in ltconfig and lines #9518-9523 in configure. Yes I missed the filenames.
Sorry.

In the meantime, I can say you more about these errors.

In the configure error, sed doesn’t seem to accept to replace (s
function) things with “# Generated automatically from toto.in by
configure.”-like stuff. Since it’s not mandatory, I could fix it changing
lines #9518-9519 to:
<<>>
sed -e "
<<>>
Now, Makefiles are generated, but they’re not usable yet.

In the ltconfig error, sed (still sed) doesn’t like sed_quote_subst (line
#157), double_quote_subst (line #160) and delay_variable_subst (line #164)
command expressions.

These errors never happen on Linux, so I think the error come from the
sed utility provided with cygwin (GNU sed version 3.02). I’ll try to
download a newer version of it, and I’ll tell you more if I find more.

Best regards,
IoDream.

-----Message d’origine-----De : sdl-admin at libsdl.org [mailto:sdl-admin at libsdl.org]De la part de Jo
Envoy? : Aucune
? : SDL mailing-list
Objet : [SDL] Problems to compile SDL* under GNU Win32 compilers.

 Hello to all,


But after all this, I still can’t compile the libraries. I can’t even
have a makefile to look and hack. For example: SDL-1.2.2. I provide with the
generated config.log, plus the file makingof.exe generated by “./configure >
makingof.txt 2>&1”, both are gzipped. Look at the latter. At the lines
#46-104, there is a lot of sed errors (caused by the sed expression line
#2781), but I can’t see the reason since I’m not a sed expert. Then at lines
#137-260, there is also a lot of sed errors (caused by the sed expression
lines #9518-9523), and creation of all Makefile; a `big’ problem is that all
these makefiles are empty, as do SDL.spec and sdl-config files. Isn’t that
weird ?!

Best regards,
IoDream.


ifrance.com, l’email gratuit le plus complet de l’Internet !
vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP…
http://www.ifrance.com/_reloc/email.emailif

Hello Johannes,

I’ve tryed to run reimp (yes, only run) on some official SDL libraries,
without going further to know if the conversion had worked.
Successfully runned on: SDL.lib (1.2.2), SDL_net.lib (1.2.2).
Didn’t worked on: SDLmain.lib (1.2.2), SDL_image.lib (1.2.0), SDL_mixer
(1.2.0).
As you can see, this program don’t work on half the SDL libraries, so I
think it’s not really usable. And more, I’ve not tested if the generated .a
file would effectively work in a project build.

Best regards,
IoDream.

-----Message d’origine-----De : sdl-admin at libsdl.org [mailto:sdl-admin at libsdl.org]De la part de
Johannes Schmidt
Envoy? : lundi 20 ao?t 2001 12:02
? : sdl at libsdl.org
Objet : Re: [SDL] Problems to compile SDL* under GNU Win32 compilers.

On Sunday 19 August 2001 19:16, Bille2 wrote:

The reason I want to recompile these libraries is that if you wanna
use them into your programs, you must have respective .lib files, but
GNU

Win32
compilers require .a (and .la) files instead, and the latter ones are
almost
never supplied (the exception is SDL itself). Am I wrong ? So you must
make
them yourself.

try to simply change the name blabla.lib into blabla.a, it should works
!

I don ?t compile under windows, but I herad of a tool called reimp
that converts *.lib to *.a files.

http://www.acc.umu.se/~anorland/gnu-win32/


Johannes Schmidt

< http://libufo.sourceforge.net >
< http://m31.sourceforge.net >


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


ifrance.com, l’email gratuit le plus complet de l’Internet !
vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP…
http://www.ifrance.com/_reloc/email.emailif