Closed Bug 298655 Opened 20 years ago Closed 19 years ago

--enable-pango fails if pango libs are not in default location

Categories

(Firefox Build System :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: wolfiR, Assigned: wolfiR)

Details

(Keywords: fixed1.8)

Attachments

(2 files, 3 obsolete files)

If --enable-pango is configured, configure fails with:
checking whether C++ compiler has -pedantic long long bug... yes
configure: error: Your compiler appears to have a known bug where long long is
miscompiled when using -pedantic.  Reconfigure using --disable-pedantic.

The following is the output of config.log:
configure:15974: checking whether C++ compiler has -pedantic long long bug
configure:15985: c++ -o conftest -O2 -fmessage-length=0 -Wall
-D_FORTIFY_SOURCE=2 -Os -fno-strict-aliasing 
-fshort-wchar -pthread -pipe  -Wall -Wconversion -Wpointer-arith -Wcast-align
-Woverloaded-virtual -Wsynth 
-Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -pedantic  
-I/usr/X11R6/include  conftest.C -l
pangoft2-1.0 -ldl -lm  1>&5
/usr/lib64/gcc/x86_64-suse-linux/4.0.1/../../../../x86_64-suse-linux/bin/ld:
cannot find -lpangoft2-1.0
collect2: ld returned 1 exit status
configure: failed program was:
#line 15979 "configure"
#include "confdefs.h"
 int main () {
                if (sizeof(long long) != 8) { return 1; } 
                    return 0; } 

The pango libs are not found because they are somewhere under /opt but configure
knows it:

checking MOZ_PANGO_LIBS... -L/opt/gnome/lib64   -lpango-1.0 -lgobject-2.0
-lgmodule-2.0 -ldl -lglib-2.0  
checking for pango_fc_font_map_add_decoder_find_func in -lpangoft2-1.0... yes
with my limited autoconf knowledge it seems that the following happens:

the statement

AC_CHECK_LIB(pangoft2-1.0, pango_fc_font_map_add_decoder_find_func,,
                 AC_MSG_ERROR([Your Pango is too old. Sorry.]))

seems to add -lpangoft2-1.0 to $LIBS.
This $LIBS variable is used then for every test-compilation in configure.
Attached patch possible patch (obsolete) — Splinter Review
I have no autoconf version to check if this works correctly. So this is only a
theoretical shot.
Assignee: nobody → mozilla
Status: NEW → ASSIGNED
Attached patch other patch (obsolete) — Splinter Review
here is another one, but I'm again unsure if it works with older autoconfs like
mozilla is using
Attachment #193417 - Attachment is obsolete: true
Attached patch third attemptSplinter Review
this looks good when looking at the generated configure (with autoconf 2.13).
Attachment #193419 - Attachment is obsolete: true
another alternative as discussed with caillon
Comment on attachment 193446 [details] [diff] [review]
remove obsolete lib check and bump required pango version

http://developer.gnome.org/doc/API/2.0/pango/PangoFcFontMap.html#pango-fc-font-
map-add-decoder-find-func
Attachment #193446 - Flags: review+
bsmedberg, cls: any objections?
BTW: I would like to request approval for 1.8b4 in addition, but I don't want to
set the flag without consensus about the patch.
Comment on attachment 193446 [details] [diff] [review]
remove obsolete lib check and bump required pango version

What distros does this actually affect? Do old FCs fall over on this?
Fedora is not be affected since we install pango under /usr
no SUSE distribution up to now uses Pango for font rendering.
I don't know about the others.
Comment on attachment 193446 [details] [diff] [review]
remove obsolete lib check and bump required pango version

The pango pkgconfig file doesn't contain -lpangoft2-1.0 .  We still need a
check for pangoft2.  You can use a similar PKG_CHECK_MODULES() call for that.
Attachment #193446 - Flags: superreview-
according to documentation this should work
Attachment #193446 - Attachment is obsolete: true
Attachment #193538 - Flags: review?(cls)
Attachment #193538 - Flags: review?(cls) → review+
Comment on attachment 193538 [details] [diff] [review]
check for pangoft2 explicitely

Would be nice to have it also on branch. It only affects builds with
--enable-pango for font rendering
Attachment #193538 - Flags: approval1.8b4?
Attachment #193538 - Flags: approval1.8b4? → approval1.8b4+
Checking in configure.in;
/cvsroot/mozilla/configure.in,v  <--  configure.in
new revision: 1.1503.2.4; previous revision: 1.1503.2.3
done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Keywords: fixed1.8
Resolution: --- → FIXED
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: