Bug 44908

Summary: gal requires libgal to build libgal
Product: [Retired] Red Hat Raw Hide Reporter: Enrico Scholz <rh-bugzilla>
Component: galAssignee: Havoc Pennington <hp>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-04-02 20:11:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
fix for this bug, rerun 'autoconf' to regen. configure
none
fixed version none

Description Enrico Scholz 2001-06-18 19:22:14 UTC
Description of Problem:

gal/Makefile.am contains

| libgal_la_LDFLAGS = -version-info $(GAL_CURRENT):$(GAL_REVISION):$(GAL_AGE) \
|          $(ICONV_LIBS) $(GAL_LIBS)

where $(GAL_LIBS) gets expanded to

| GAL_LIBS = -lgal -rdynamic -L/usr/lib -L/usr/X11R6/lib ...


The $(GAL_LIBS) was added by your libgal-borken.patch.


When trying to compile gal without an installed gal I get

------------- make ----------------
rm -fr .libs/libgal.la .libs/libgal.* .libs/libgal.*
gcc -shared  bogus_automake_hack.lo util/e-bit-array.lo 
[... a lot of other .lo files ...]
-lgal -L/usr/lib -L/usr/X11R6/lib -lgnomeprint -ltiff -ljpeg -lpng
-lglade-gnome -lglade -lxml -lz -lgnomeui -lart_lgpl -lgdk_imlib -lSM -lICE
-lgnome -lgnomesupport -lesd -laudiofile -ldb1 -lgdk_pixbuf -lgtk -lgdk
-lgmodule -lglib -ldl -lXi -lXext -lX11 -lm -lgnomecanvaspixbuf -lc 
-Wl,-soname -Wl,libgal.so.7 -o .libs/libgal.so.7.0.0
/usr/bin/ld: cannot find -lgal
collect2: ld returned 1 exit status
make[3]: *** [libgal.la] Error 1
make[2]: *** [all-recursive] Error 1
------------------------------------

and the build fails.

Replaced the $(GAL_LIBS) with $(filter-out -lgal, $(GAL_LIBS)) in your
patch should solve to problem.


How Reproducible:

evrytime

Steps to Reproduce:
1. rpm -e gal-devel
2. rpm --rebuild gal-0.8-4.src.rpm


Actual Results:
...
lm -lgnomecanvaspixbuf -lc  -Wl,-soname -Wl,libgal.so.7 -o
.libs/libgal.so.7.0.0
/usr/bin/ld: cannot find -lgal
collect2: ld returned 1 exit status
make[3]: *** [libgal.la] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1

Comment 1 Vladimir Kondratiev 2001-07-15 07:27:42 UTC
Created attachment 23627 [details]
fix for this bug, rerun 'autoconf' to regen. configure

Comment 2 Vladimir Kondratiev 2001-07-15 20:27:50 UTC
Sorry!!!
Patch I submitted is incorrect. If you patch this way, compilation for all
programs that use gal, will broke. Correct patch is to fix existing patch,
libgal-broken.patch
This patch adds $(GAL_LIBS) to libgal_la_LDFLAGS. What is wrong here:
$(GAL_LIBS) contain -lgal, which should be filtered out.
I fill providing patch for patch is a bit overkill, so I attach fixed
libgal-broken.patch. Do not use gal-cyclicdep.patch

Comment 3 Vladimir Kondratiev 2001-07-15 20:29:14 UTC
Created attachment 23647 [details]
fixed version

Comment 4 Havoc Pennington 2002-04-09 16:40:13 UTC
Alex seems to have fixed this in July:

* Tue Jul 24 2001 Alexander Larsson <alexl>
- Fix libgal-broken.patch to not link libgal.so to -lgal.