Hello, I just wanted to compile the Gears example from the HOpenGL's GLUT source but it didn't work. I got the following messages: Chasing modules from: Gears.hs Compiling Main ( Gears.hs, Gears.o ) Linking ... /usr/bin/ld: cannot find -lSM collect2: ld returned 1 exit status I use Debian GNU/Linux 3.1 (sarge) and have the following packages installed: ghc6 (6.2.2-3) ghc6-hopengl (6.2.2-3) ghc6-prof (6.2.2-3) Anyone who can help me? Best wishes, Wolfgang
Linking ... /usr/bin/ld: cannot find -lSM collect2: ld returned 1 exit status
I've had GHC (ld actually) die for similar things like "cannot find -lgmp". Here is how I fixed it. Make sure you have libSM, the X Session Management Library, and make sure that it is in a place where ld looks. You can usually test what ld (the linker) sees by typing "ldconfig -p | grep -i libsm" for example, to see if it knows about libsm and what it calls it. You can then symlink ("ln -s ...") the right libraries if they exists but have the wrong name (for example, libsm-xyz.a instead of plain libsm.a) If you don't have libsm somewhere on you system, try using aptitude, synaptic or apt-get to add libSM; if that doesn't work, you may need the development libs/include files, as I had happen to me once for some other library I forget at the moment... Good luck, Jared. -- jupdike@gmail.com http://www.updike.org/~jared/ reverse ")-:"
Am Freitag, 6. Januar 2006 21:13 schrieb Wolfgang Jeltsch:
Hello,
I just wanted to compile the Gears example from the HOpenGL's GLUT source but it didn't work. I got the following messages:
Chasing modules from: Gears.hs Compiling Main ( Gears.hs, Gears.o ) Linking ... /usr/bin/ld: cannot find -lSM collect2: ld returned 1 exit status
I use Debian GNU/Linux 3.1 (sarge) and have the following packages installed:
ghc6 (6.2.2-3) ghc6-hopengl (6.2.2-3) ghc6-prof (6.2.2-3)
Anyone who can help me?
Best wishes, Wolfgang
I tried it now with the haskell-unsafe backports: ghc6 (6.4.1-1~stable) ghc6-hopengl (6.4.1-1~stable) ghc6-prof (6.4.1-1~stable) Alas, the same problem. Best wishes, Wolfgang
Hello again, now that I had installed libsm-dev and libxmu-dev, building a Gears binary worked well. Since the problem didn't seem related to the GHC version, I deinstalled the GHC backports and installed GHC from sarge again which is 6.2.2. However, with GHC 6.2.2 I got these error messages during compiling Gears.hs: /tmp/ghc10821.hc: In function `sfcm_ret': /tmp/ghc10821.hc:1098: warning: assignment discards qualifiers from pointer target type /tmp/ghc10821.hc: In function `sfcf_ret': /tmp/ghc10821.hc:1216: warning: assignment discards qualifiers from pointer target type /tmp/ghc10821.hc: In function `sfc8_ret': /tmp/ghc10821.hc:1334: warning: assignment discards qualifiers from pointer target type /tmp/ghc10821.hc: In function `Main_info_entry': /tmp/ghc10821.hc:1443: warning: assignment discards qualifiers from pointer target type What does this have to say? Best wishes, Wolfgang
participants (2)
-
Jared Updike -
Wolfgang Jeltsch