You are not logged in.

#1 2007-04-08 18:08:20

tockar
Member
From: Poland
Registered: 2006-06-08
Posts: 15
Website

new makepkg.conf and compilation problem

Hi,

After pacman upgrade (3.0) and configuring new /etc/makepkg.conf my CFLAGS and CXXFLAGS are ignored and packages are compiled with default
"-march=i686 -O2 -pipe". Also, ccache doesn't work, and i enable it /etc/makepkg.conf. Before this upgrade everything worked fine.

My /etc/makepkg.conf:

#
# /etc/makepkg.conf
#

#########################################################################
# SOURCE ACQUISITION
#########################################################################
#
#-- The FTP/HTTP download utility that makepkg should use to acquire sources
FTPAGENT="/usr/bin/wget --continue --passive-ftp --tries=3 --waitretry=3 --no-check-certificate"
#FTPAGENT="/usr/bin/snarf"
#FTPAGENT="/usr/bin/lftpget -c"

#########################################################################
# ARCHITECTURE, COMPILE FLAGS
#########################################################################
#
CARCH="i686"
CHOST="i686-pc-linux-gnu"

#-- Exclusive: will only run on i686
# -mtune builds exclusively for an architecture
# -mcpu optimizes for an architecture, but builds for the whole processor family
CFLAGS="-march=pentium4 -Os -pipe -fomit-frame-pointer"
CXXFLAGS="-march=pentium4 -Os -pipe -fomit-frame-pointer"
#-- Make Flags: change this for DistCC/SMP systems
#MAKEFLAGS="-j2"

#########################################################################
# BUILD ENVIRONMENT
#########################################################################
#
# Defaults: BUILDENV=(!fakeroot !distcc color !ccache)
#
#-- fakeroot: Allow building packages as a non-root user
#-- distcc:   Use the Distributed C/C++/ObjC compiler
#-- color:    Colorize output messages
#-- ccache:   Use ccache to cache compilation
#
BUILDENV=(fakeroot !distcc color ccache)
#
#-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
#-- specify a space-delimited list of hosts running in the DistCC cluster.
#DISTCC_HOSTS=""

#########################################################################
# GLOBAL PACKAGE OPTIONS
#   These are default values for the options=() settings
#########################################################################
#
# Default: OPTIONS=(strip !docs !libtool emptydirs)
#
#-- strip:     Strip symbols from binaries/libraries
#-- docs:      Save doc and info directories
#-- libtool:   Leave libtool (.la) files in packages
#-- emptydirs: Leave empty directories in packages
#
OPTIONS=(strip !docs !libtool emptydirs)

#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512
INTEGRITY_CHECK=(md5)
#-- Info and doc directories to remove (if option set correctly above)
DOC_DIRS=(usr/{,share/}{info,doc,gtk-doc} opt/gnome/{,share/}{info,doc,gtk-doc})

#########################################################################
# PACKAGE OUTPUT
#########################################################################
#
# Default: put built package and cached source in build directory
#
#-- Destination: specify a fixed directory where all packages will be placed
#PKGDEST=/home/packages
#-- Source cache: specify a fixed directory where source files will be cached
#SRCDEST=/home/sources
#-- Packager: name/email of the person or organization building packages
#PACKAGER="John Doe <john@doe.com>"

# vim: set ft=sh ts=2 sw=2 et:

And here is a little part of gaim-svn compilation (with "gcc", should be "ccache gcc", "-march=i686 -O2 -pipe", should be "-march=pentium4 -Os -pipe -fomit-frame-pointer"):

gcc -c  -I. -I. -I../../../.. -I../../../../libgaim -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -I/usr/lib/perl5/5.8.8/i686-linux-thread-multi/CORE  -g -g -O2 -march=i686 -O2 -pipe   -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\" -fpic "-I/usr/lib/perl5/5.8.8/i686-linux-thread-multi/CORE"  -Wall  -Waggregate-return -Wcast-align -Wdeclaration-after-statement -Werror-implicit-function-declaration -Wextra -Wno-sign-compare -Wno-unused-parameter -Winit-self -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wundef -D_FORTIFY_SOURCE=2 Cipher.c
/usr/bin/perl /usr/lib/perl5/5.8.8/ExtUtils/xsubpp  -typemap /usr/lib/perl5/5.8.8/ExtUtils/typemap -typemap typemap  Cmds.xs > Cmds.xsc && mv Cmds.xsc Cmds.c
gcc -c  -I. -I. -I../../../.. -I../../../../libgaim -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -I/usr/lib/perl5/5.8.8/i686-linux-thread-multi/CORE  -g -g -O2 -march=i686 -O2 -pipe   -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\" -fpic "-I/usr/lib/perl5/5.8.8/i686-linux-thread-multi/CORE"  -Wall  -Waggregate-return -Wcast-align -Wdeclaration-after-statement -Werror-implicit-function-declaration -Wextra -Wno-sign-compare -Wno-unused-parameter -Winit-self -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wundef -D_FORTIFY_SOURCE=2 Cmds.c

Offline

#2 2007-04-08 22:01:58

toofishes
Developer
From: Chicago, IL
Registered: 2006-06-06
Posts: 602
Website

Re: new makepkg.conf and compilation problem

gcc will never show up as ccache gcc- that isn't how it is called. The links in /usr/lib/ccache/bin/gcc are called instead.

Regarding makeflags- are you sure you compiled this exact package before? Some Makefiles are bad and do not respect the environment variable, and the default -march=i686 is nowhere to be found in makepkg, so that is coming from somewhere else.

Offline

#3 2007-04-09 22:10:30

tockar
Member
From: Poland
Registered: 2006-06-08
Posts: 15
Website

Re: new makepkg.conf and compilation problem

So how can I be sure that ccache is enabled and working?
Makeflags - I know that there are some packages like mplayer that unset/ignores CFLAGS to compile.

I think I have something... In Gaim's Help -> about gaim are some informations:
Gaim 2.0.06b from current repo: http://img152.imageshack.us/img152/5703/gaimrepohz7.png
My Gaim 2.0.06b compiled and pacman3 is installed: http://img389.imageshack.us/img389/4695 … ionqn2.png
Friend's Gaim 2.0.06b compiled and latest pacman2 is installed: http://img133.imageshack.us/img133/276/89290326vf5.jpg

I've also disabled gtkspell on compiled gaim for more differences between gaim from repo and compiled.
On my compiled gaim there's no CFLAGS and CXXFLAGS on "arguments to ./configure:" My friend is also using ccache and there are informations about that. Can someone with pacman3 installed and without my problems compile gaim and show the "arguments to ./configure:" info?

Last edited by tockar (2007-04-09 22:52:43)

Offline

#4 2007-04-09 22:21:57

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: new makepkg.conf and compilation problem

To confirm that ccache really works you could remove ~/.ccache dir (if exists), run makepkg and then check whether ~/.ccache has been created.

Anyway - it works here. I haven't meddled with compilation flags.

Last edited by lucke (2007-04-09 22:24:02)

Offline

#5 2007-04-09 22:50:33

tockar
Member
From: Poland
Registered: 2006-06-08
Posts: 15
Website

Re: new makepkg.conf and compilation problem

lucke wrote:

To confirm that ccache really works you could remove ~/.ccache dir (if exists), run makepkg and then check whether ~/.ccache has been created.

~/.ccache removed, XChat compiled and ~/.ccache was created. So it is working, thanks. But what about compilation flags?

Last edited by tockar (2007-04-09 22:51:49)

Offline

#6 2007-04-22 08:10:50

DaNiMoTh
Member
Registered: 2006-06-10
Posts: 260

Re: new makepkg.conf and compilation problem

I have the same problem with CFLAGS.

But, with echoes or launching make with

make CFLAGS="$CFLAGS"

I can see that CFLAGS variable is set.

I'll investigate on this.

Offline

#7 2007-04-22 17:19:00

DaNiMoTh
Member
Registered: 2006-06-10
Posts: 260

Re: new makepkg.conf and compilation problem

Offline

Board footer

Powered by FluxBB