Wrecked Games

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're just that awesome.

Author Topic: OIS build/install process does not create shared library  (Read 2189 times)

init

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 6
    • View Profile
OIS build/install process does not create shared library
« on: April 14, 2006, 02:06:57 AM »

Hi,

I just downloaded, built and installed OIS 0.6.0. I noticed that no shared library was created, only a static one, even though the configure output says:

Code: [Select]

checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
<snip>
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
<snip>
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes


Any ideas?

My OS is Fedora Core 5.

Regards
Ingemar
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
OIS build/install process does not create shared library
« Reply #1 on: April 14, 2006, 07:49:09 AM »

Well, OIS only builds as static lib under Linux. It could build under shared lib, but that would need a patch for the configure scripts (to allow building of shared lib).
Logged

init

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 6
    • View Profile
OIS build/install process does not create shared library
« Reply #2 on: April 15, 2006, 01:55:32 PM »

Quote from: "pjcast"
Well, OIS only builds as static lib under Linux. It could build under shared lib, but that would need a patch for the configure scripts (to allow building of shared lib).


I wrote such a patch. The patch actually just changes the src/Makefile.am to use libtool to build the library. Then I get both a static and a shared library, which is what I want. The reason that I want this is because when I get time, I might build RPMs for Fedora Core of everything I have used yet, such as OIS, Ogre, DevIL (Ogre dependency) and CEGUI.

Since I cannot attach a patch to this message, I include it in the message body instead:

Code: [Select]

--- ois/src/Makefile.am 2006-03-04 21:29:29.000000000 +0100
+++ ois-0.6.0/src/Makefile.am   2006-04-15 23:03:00.000000000 +0200
@@ -1,10 +1,7 @@
 INCLUDES = $(STLPORT_CFLAGS) -I$(top_srcdir)/includes $(CFLAGS) -I/usr/X11R6/in
clude
 
-#libOIS_LTLIBRARIES=libOIS.la
-libOISdir = $(libdir)
-libOIS_LIBRARIES = libOIS.a
-
-libOIS_a_SOURCES = OISInputManager.cpp \
+lib_LTLIBRARIES=libOIS.la
+libOIS_la_SOURCES = OISInputManager.cpp \
                 OISObject.cpp \
                 OISEffect.cpp \
                 OISJoyStick.cpp \
@@ -16,9 +13,9 @@
                 ./linux/LinuxMouse.cpp
 
 if OIS_BUILD_LINUX_EVENTS
-libOIS_a_SOURCES += ./linux/LinuxJoyStickEvents.cpp ./linux/LinuxForceFeedback.
cpp
+libOIS_la_SOURCES += ./linux/LinuxJoyStickEvents.cpp ./linux/LinuxForceFeedback
.cpp
 else
-libOIS_a_SOURCES += ./linux/LinuxJoyStick.cpp
+libOIS_la_SOURCES += ./linux/LinuxJoyStick.cpp
 endif
 
 #libOIS_a_LIBFLAGS = -L/usr/X11R6/lib


Any reason why you didn't use libtool? As you can see in the patch, the first line removed is actually a commented-out libtool line, so it seems like you had already some plans to use it.
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
OIS build/install process does not create shared library
« Reply #3 on: April 15, 2006, 02:07:04 PM »

Heh, I cannot recall why I did the makefiles like i did... Really, it is probably because they were mostly hacked together, as, I find understanding the whole autoconfigure/tools etc a pita ;) My motto was just get it to a) build as a static lib, nd b) run :)

I will take a look at adding this patch. (Also, there is the patch tracker on the sourceforge page too - but here is fine for something small like this). Do both the shared lib and static lib get installed during make install?
Logged

init

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 6
    • View Profile
OIS build/install process does not create shared library
« Reply #4 on: April 15, 2006, 03:47:23 PM »

Quote from: "pjcast"
I will take a look at adding this patch. (Also, there is the patch tracker on the sourceforge page too - but here is fine for something small like this). Do both the shared lib and static lib get installed during make install?


I know about the tracker, but it looked empty (no open issues) which is unusual, so I wasn't sure if it was actively used. I'll post there next time if I have any issues.

And yes, both the shared and the static library gets installed during make install:

Code: [Select]
$ ls /usr/local/lib/libOIS.*
/usr/local/lib/libOIS.a   /usr/local/lib/libOIS.so.0
/usr/local/lib/libOIS.la  /usr/local/lib/libOIS.so.0.0.0
/usr/local/lib/libOIS.so


Regards
Ingemar
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
OIS build/install process does not create shared library
« Reply #5 on: April 15, 2006, 07:47:44 PM »

Of course the tracker is cleared :D I hate to keep things pending, and anything I get I implement as soon as possible ;)

Nice, I will get this in sometime next week, as I am just ending spring break, easter tomorrow, and a project due on monday.. so, busy busy busy :)
Logged

init

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 6
    • View Profile
OIS build/install process does not create shared library
« Reply #6 on: April 16, 2006, 01:30:51 AM »

Quote from: "pjcast"
Of course the tracker is cleared :D I hate to keep things pending, and anything I get I implement as soon as possible ;)


I like that attitude.

Quote from: "pjcast"
Nice, I will get this in sometime next week, as I am just ending spring break, easter tomorrow, and a project due on monday.. so, busy busy busy :)


I see. If you have some spare time some day, I suggest that you take a look at the Autobook. Although somewhat dated, it can be quite useful when poking around in the autotools input files.
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
OIS build/install process does not create shared library
« Reply #7 on: April 25, 2006, 01:00:40 PM »

Thanks, this has been applied to CVS :)
Logged