Closed Bug 272453 Opened 20 years ago Closed 19 years ago

Building 0.9 from source with non-standard library locations fails

Categories

(Thunderbird :: Build Config, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED EXPIRED

People

(Reporter: clint, Assigned: mscott)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: 

After fiddling with pkg-config settings to placate the configure process and
setting some configure options, the build process fails to find key libraries
like libIDL etc. when finally performing the build.  My .mozconfig file looks like:

. $topsrcdir/mail/config/mozconfig

mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/tbird-obj

ac_add_options --enable-crypto
ac_add_options --enable-optimize
ac_add_options --disable-debug

ac_add_options --enable-default-toolkit=gtk2
ac_add_options --with-gtk-prefix=/usr/intel/pkgs/gtk+/2.4.7
ac_add_options --enable-xft
ac_add_options --with-libIDL-prefix=/usr/intel/pkgs/libIDL/0.8.4

ac_add_options --prefix=/nfs/pdx/disks/pdx_otools
ac_add_options --exec-prefix=/nfs/pdx/disks/pdx_otools/Linux

and PKG_CONFIG_PATH is:

/usr/intel/pkgs/gtk+/2.4.7/lib/pkgconfig:/usr/intel/pkgs/glib/2.4.5/lib/pkgconfig:/usr/intel/pkgs/pango/1.6.0/lib/pkgconfig:/usr/intel/pkgs/atk/1.6.1/lib/pkgconfig:/usr/intel/pkgs/xft/2.1.2/lib/pkgconfig:/usr/intel/pkgs/fontconfig/2.2.96/lib/pkgconfig:/usr/intel/pkgs/libIDL/0.8.4/lib/pkgconfig

The build eventually fails with:

../../dist/bin/xpidl -m header -w
-I/fs26/psc.home/design/archive/olsenc/ftp/mozilla/xpcom/base -I../../dist/idl
-o _xpidlgen/nsIConsoleListener
/fs26/psc.home/design/archive/olsenc/ftp/mozilla/xpcom/base/nsIConsoleListener.idl
../../dist/bin/xpidl: error while loading shared libraries: ../../dist/bin/xpidl
-m header -w -I/fs26/psc.home/design/archive/olsenc/ftp/mozilla/xpcom/base
-I../../dist/idl -o _xpidlgen/nsIConsoleListener
/fs26/psc.home/design/archive/olsenc/ftp/mozilla/xpcom/base/nsIConsoleListener.idl
../../dist/bin/xpidl: error while loading shared libraries: libIDL-2.so.0:
cannot open shared object file: No such file or directory: cannot open shared
object file: No such file or directory

Clearly, libIDL-2.so.0 can be found in the directory specified using the
ac_add_options as well as the PKG_CONFIG_PATH environment variable.  It's
unclear to me which settings eventually influence the build.  Furthermore, not
every prefix/path switch is available for all the library dependencies, so even
if I get past this, I'm guessing that I'll have trouble with xft as well.

Suggestions?

Reproducible: Always
Steps to Reproduce:
1. .mozconfig provided
2. make -f client.mk build_all
Actual Results:  
../../dist/bin/xpidl -m header -w
-I/fs26/psc.home/design/archive/olsenc/ftp/mozilla/xpcom/base -I../../dist/idl
-o _xpidlgen/nsIConsoleListener
/fs26/psc.home/design/archive/olsenc/ftp/mozilla/xpcom/base/nsIConsoleListener.idl
../../dist/bin/xpidl: error while loading shared libraries: libIDL-2.so.0:
cannot open shared object file: No such file or directory
gmake[4]: *** [_xpidlgen/nsIConsoleListener.h] Error 127
gmake[4]: Leaving directory
`/fs26/psc.home/design/archive/olsenc/ftp/mozilla/tbird-obj/xpcom/base'
gmake[3]: *** [export] Error 2
gmake[3]: Leaving directory
`/fs26/psc.home/design/archive/olsenc/ftp/mozilla/tbird-obj/xpcom'
gmake[2]: *** [tier_2] Error 2
gmake[2]: Leaving directory
`/fs26/psc.home/design/archive/olsenc/ftp/mozilla/tbird-obj'
make[1]: *** [default] Error 2
make[1]: Leaving directory
`/fs26/psc.home/design/archive/olsenc/ftp/mozilla/tbird-obj'
make: *** [build] Error 2

% ldd tbird-obj/xpcom/typelib/xpidl/xpidl
        libIDL-2.so.0 => not found
        libglib-2.0.so.0 => not found
        libdl.so.2 => /lib/libdl.so.2 (0x40027000)
        libm.so.6 => /lib/i686/libm.so.6 (0x4002b000)
        libpthread.so.0 => /lib/i686/libpthread.so.0 (0x4004e000)
        libc.so.6 => /lib/i686/libc.so.6 (0x40063000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)


Expected Results:  
Create xpidl with the appropriate dynamic dependency.
So, I just went in and brute-forced this.  It turns out that if you're doing a
dynamic build, you need to generate a -Wl,--rpath,location/to/shared/lib for
every non-standard library location (of -L/location/of/shared/lib).  This works
for all those directories.  However, there is a runtime dependency on the
Thunderbird lib installation area, and the only way I got this fixed was to
actually find out where the mozilla runtime libraries went and then recompiled
the various pieces manually and adding this rpath switch as well.

Unfortunately, I don't know enough about the Mozilla build system to find out
where these switches should be added.  Clearly they need to be attached to a
$LIB variable of some sort during the make process, but which one?  And it also
needs to be done in a way that's portable across compilers.  The method I've
described works for gcc...
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
This bug has been automatically resolved after a period of inactivity (see above
comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → EXPIRED
You need to log in before you can comment on or make changes to this bug.