If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

The -fno-inline flag specified in the debug flags messes up optimised compilations.

RESOLVED DUPLICATE of bug 247463

Status

SeaMonkey
Build Config
--
minor
RESOLVED DUPLICATE of bug 247463
13 years ago
13 years ago

People

(Reporter: Mark Fortescue, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/4.76 [en] (X11; U; Linux 2.2.14-12 i486; Nav)
Build Identifier: mozilla-source-1.8a3.tar.bz2

The build fails while compiling nsinstall.c.
The fault is actually a failure in the C header files caused by the use of the
-fno-inline flag when combined with the -O3 optimisation.

Reproducible: Always
Steps to Reproduce:
1. export CC="gcc -O3 -g1 -ggdb -march=i486"
2. ../mozilla/configure --enable-default-toolkit=xlib --enable-crypto
--disable-gnomevfs --disable-gnomeui --enable-debug --with-pthreads --with-x
--disable-gtktest --disable-mailnews --disable-composer --enable-debug
--enable-optimize=-O3 --disable-efence --disable-necko-disk-cache
--enable-necko-small-buffers
3. make

Actual Results:  
....
gcc -O3 -g1 -ggdb -march=i486  nsinstall.o   -o nsinstall
nsinstall.o: In function `relatepaths':
/mnt/mark/mozilla-i486/nsprpub/config/../../../mozilla/mozilla-1.8a3/nsprpub/config/nsinstall.c:562:
undefined reference to `__strcpy_small'
collect2: ld returned 1 exit status
gmake[3]: *** [nsinstall] Error 1
gmake[3]: Leaving directory `/mnt/mark/mozilla-i486/nsprpub/config'
gmake[2]: *** [export] Error 2
gmake[2]: Leaving directory `/mnt/mark/mozilla-i486/nsprpub'
gmake[1]: *** [nspr] Error 2
gmake[1]: Leaving directory `/mnt/mark/mozilla-i486'
make: *** [default] Error 2


Expected Results:  
It should have built correctly.

The failure ocoures due to the use of inline functions in 'bits/string2.h'.
The first two simple work arrounds are:

1) Do not generate debuggable optimised builds (Use Optimisation flags: -O0).
2) Edit the configuration scripts/files to remove the -fno-inline flag.

Looking at the string2.h header file, it may be posible to fix the problem with
an appropriate set of #defines however there may be other header files affected
so it may be difficult to track down all the required #defines.

Im my view, the prefered situation would be to remove the -fno-inline flag and
generate a warning if optimisations other than -O0 are used with debugging
enabled.

Files affected are:
mozilla/configure
mozilla/configure.in
mozilla/nsprpub/configure
mozilla/nsprpub/configure.in
mozilla/directory/c-sdk/configure
mozilla/directory/c-sdk/configure.in

Comment 1

13 years ago
WFM on Fedora Core 2 with glibc 2.3.3.  I believe this is a glibc specific
issue.  Try adding -D__NO_STRING_INLINES to your CFLAGS or upgrading your
version of glibc or not using --enable-debug.  Having an debuggable optimzed
build is a desired feature so neither of the options you gave is really acceptable.

*** This bug has been marked as a duplicate of 247463 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → DUPLICATE
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.