1

I am trying to install UltraStarDeluxe on a linux machine. The make uses compile scripts generated by fpc (Free Pascal). On invoking make, the following is the error+warning message before ld exits:

/usr/bin/ld: warning: ../game/link.res contains output sections; did you forget -T?
/usr/bin/ld: cannot find -lSDL_image
/home/sriram/ultraDX/ultrastardx-1.1-src/src/ultrastardx.dpr(344,1) Error: Error while linking
/home/sriram/ultraDX/ultrastardx-1.1-src/src/ultrastardx.dpr(344,1) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled)
make[1]: *** [../game/ultrastardx] Error 1
make[1]: Leaving directory `/home/sriram/ultraDX/ultrastardx-1.1-src/src'
make: *** [all] Error 2

I know from here that the warning message ("did you forget -T") is a bug and has been removed. Here is my question:

Update: 1. I searched the internet some more and see that SDL stands for Simple Direct Media Layer. I installed the library and now, according to the question here, my /usr/local/lib contains the following:

default.sfx           libSDL-1.2.so.0.11.3  libSDL.la             libSDL.so           
libSDL-1.2.so.0       libSDL.a              libSDLmain.a          pkgconfig/  

However, the errors, as mentioned above, are still there. How can I get rid of them?

Update 2:
@wormsparty: I got around the errors by doing an rpm -U SDL_image-1.2.10-1.i586.rpm. I now get package SDL_image-1.2.10-1.i586 is already installed. I also checked /usr/lib and found the following libraries installed:

 libSDL-1.2.so.0  libSDL-1.2.so.0.11.2  libSDL_image-1.2.so.0  libSDL_image-1.2.so.0.8.2  libSDL.so

Is this what I should be looking for?

Community
  • 1
  • 1
Sriram
  • 10,298
  • 21
  • 83
  • 136

1 Answers1

2

You are looking for SDL_image, which provides libSDL_image.so. It is a seperate library.

Try and install that library. The package is usually named SDL_image.

You can also grab it here: http://www.libsdl.org/projects/SDL_image/

Edit: About the difference between package X and X-devel:

Libraries are of the form lib${Name}.so.${Version}. There can be subversions, too. The version is here to differenciate between incompatible versions, for example libpng 1.4 and 1.5 are not binary compatible.

When you link your program to your library, you could link to an exact version number (eg gcc test.c /usr/lib/libSDL_image-1.2.so.0.8.2 directly), but you usually don't really care about the exact version number, this is why we create a dynamic link: libSDL_image-1.2.so. This link will point to the exact version number.

Usually, on distributions, users who only want runtime files need neither header files, nor those dynamic links. Before, you probably had libSDL_image-1.2.so.${some_number} in /usr/lib, but the libSDL_image-1.2.so dynamic link was missing. It is provided by the SDL_image-devel packages.

wormsparty
  • 2,481
  • 19
  • 31
  • Thanks for the reply! I downloaded `SDL_image-1.2.10-1.i586.rpm` from the link you suggested and tried to install it by becoming `root` and typing `rpm -i SDL_image-1.2.10-1.i586.rpm` to which I get `file /usr/lib/libSDL_image-1.2.so.0 from install of SDL_image-1.2.10-1.i586 conflicts with file from package SDL_image-1.2.6-7.fc11.i586`. How do I solve this? – Sriram Sep 20 '11 at 09:29
  • So this means you have SDL_image already installed, but not the development files. It's something like `yum install SDL_image-devel` – wormsparty Sep 20 '11 at 09:32
  • Install `SDL_image-devel-1.2.10-1.i586.rpm` instead of `SDL_image-1.2.10-1.i586.rpm`; it's on the same download page. – wormsparty Sep 20 '11 at 09:41
  • That worked! THanks! An explanation of what is the difference between these different rpms, appended to your answer above, would be nice. – Sriram Sep 20 '11 at 09:48