x86_64 build

Ralf Corsepius rc040203 at freenet.de
Tue Oct 18 07:24:15 UTC 2005


On Tue, 2005-10-18 at 08:00 +0200, Eric TANGUY wrote:
> > On Tue, 2005-10-18 at 06:22 +0200, Eric Tanguy wrote:
> >> It seems my new package (qucs) does not build fine under x86_64
> >> architecture.
> > I regret having to say this, but checking your build log
> > http://buildsys.fedoraproject.org/logs/fedora-4-extras/19-qucs-0.0.7-5.fc4/i386/build.log
> > indicates that your package does not acknowledge RPM_OPT_FLAGS.
> >
> >>  I hope this is normal because it is not designed to run
> >> under it.
> > Cf. above. If this suspicion holds, then there is more in limbo than the
> > package not having been tested on i86_64.
> >
> > Ralf
> >
> >
> >
> Thanks Ralf, you're right. This package have not been tested i86_64. I
> don't have one! I'm new in packaging and i would like to apologize but i'm
> not sure to understand : "indicates that your package does not acknowledge
> RPM_OPT_FLAGS".

It means that your package should use the contents of $RPM_OPT_FLAGS
during compliation.

When looking at your build.log, you'll see this
...
CXXFLAGS='-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32
-march=i386 -mtune=pentium4 -fasynchronous-unwind-tables'
...
This is the expansion of  
CXXFLAGS="$RPM_OPT_FLAGS",
rpm's default way to propagate RPM_OPT_FLAGS to configure
scripts/Makefiles.


However, later inside of your build.log you can see that these compiler
flags are not being used during compilation, e.g.:
...
make[3]: Entering directory
`/builddir/build/BUILD/qucs-0.0.7/qucs/components'
if g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/X11R6/include
-I/usr/lib/qt-3.3/include -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -D_REENTRANT
-I../../qucs    -O2 -pipe -MT phaseshifter.o -MD -MP -MF
".deps/phaseshifter.Tpo" -c -o phaseshifter.o phaseshifter.cpp; \
then mv -f ".deps/phaseshifter.Tpo" ".deps/phaseshifter.Po"; else rm -f
".deps/phaseshifter.Tpo"; exit 1; fi

If the rpm spec would correctly acknowledge RPM_OPT_FLAGS, the contents
of $RPM_OPT_FLAGS would reappear inside of compiler calls.

As RPM_OPT_FLAGS also are those FLAGS which are being used to propagate
architecture dependent flags to configure scripts/Makefiles, a package
not acknowledging RPM_OPT_FLAGS will also not build correctly  on
x86_64, because there the implicit default flags do not match the system
requirements (In a nutshell, you must pass -m64 on x86-64, otherwise the
compiler will use it's implicit default (-m32) and you'll get 32bit
binaries).

Ralf





More information about the fedora-extras-list mailing list