Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37790866
en ru br
ALT Linux repos
S:1.07-alt1

Group :: System/Libraries
RPM: libsoil

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: linking_correctly.patch
Download


We need to add -fPIC for the dynamic lib. Additionally this links
libsoil against libm and libGL as it uses symbols from them.
diff --git a/projects/makefile/alternate Makefile.txt b/projects/makefile/alternate Makefile.txt
index b2ff3a4..649526b 100644
--- a/projects/makefile/alternate Makefile.txt	
+++ b/projects/makefile/alternate Makefile.txt	
@@ -4,7 +4,7 @@ INSTALL_FILE = install -p -o root -g root -m 644
 INSTALL_DIR = install -p -o root -g root -d
 LN = ln -s
 RM = rm -fv
-CFLAGS += -c -O2 -Wall
+CFLAGS += -c -O2 -Wall -fPIC
 LDFLAGS +=
 
 CFILES = image_DXT.c image_helper.c SOIL.c stb_image_aug.c
@@ -29,7 +29,7 @@ lib: $(OFILES)
 	# create static library
 	ar -cvq $(LIBNAME).a $(OFILES)
 	# create shared library
-	gcc -shared -Wl,-soname,$(LIBNAME).so.$(MAJOR) -o $(LIBNAME).so.$(VERSION) $(OFILES)
+	gcc -shared -Wl,-soname,$(LIBNAME).so.$(MAJOR) -o $(LIBNAME).so.$(VERSION) $(OFILES) -lGL -lm
 
 install:
 	$(INSTALL_DIR) $(DESTDIR)/$(INCLUDEDIR)
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin