Yet another thing... should I be concerned when the output of the qtlib3-mt build says dpkg-buildpackage: host architecture i386 when in fact I have a i686?
Yet another thing... should I be concerned when the output of the qtlib3-mt build says dpkg-buildpackage: host architecture i386 when in fact I have a i686?
nope
We are changing how things are compiled but not named. So that you use the -march= or -mtune= option is the thing that matters . It should show up when the compiler starts building; g++ ... -O2 -march= ... etc.
Ok...i will be adding this weekend some new info to the how to since i see that it is necessary. been recompiling things for 2 weeks now. mainly to learn to see what difference different packages & settings make. But there are 2 exceptions to the howto. one is with qmake. One must change the qmake.conf file. The other is when the CFLAG option is written not to include your CFLAG(which makes no sense to me). Many(probably all) libx* packages are written in this way. I wrote a little script which takes care of this so that things become more automated. You qill basically only have to use that script then.I think I have the same problem as funkyou but with kdelibs.
I'll add that script to the howto in the weekend(want to make sure it looks nice first).
Then after that the only thing,that I know of, that won't work without manually tinkering is qmake.
Last edited by GoldBuggie; December 20th, 2005 at 11:31 AM.
Ok i'll add the script i use for here so long...need to write some things before adding it to the 1st page...still not sure if i should do it or not thou.
Save this as a file; for example: recompileCode:#!/bin/bash if [ -n "$1" ] then echo ":: fetching necessary packages for build" apt-get build-dep "$@" echo ":: fetching source" apt-get source "$@" fi ourflags=$CFLAGS echo :: using $ourflags for directory in `ls -Al | awk '/^d/ {print $8}'`; do echo :: entering directory $directory ... cd $directory sed -e 's/-O2/'"${ourflags}"'/g' -i `ls -Al | awk '/^-/ {print $8}'` cd debian sed -e 's/-O2/'"${ourflags}"'/g' -i `ls -Al | awk '/^-/ {print $8}'` cd .. dpkg-buildpackage -rfakeroot -uc -b echo :: leaving directory $directory ... cd .. done
Then do ato make it executable.Code:sudo chmod +x recompile
Use it as either sudo ./recompile kdelibs. This will fetch dependencies and source before building. You can also use if for more then one package which is nice. I wanted to compile 8 packages over night so I used this.
Or just do a sudo ./recompile. This will assume you already have the source and it will only build.
Note...use this within a new directory otherwise it will span thrue your other directories and files.
This is not a pretty script since it basically assumes packages are built with -O2 and replaces the occurences of -O2 with your FLAGS. But hey..it works.
Last edited by GoldBuggie; December 20th, 2005 at 12:31 PM.
Hmm. Is this safe? Do you think the hardcoded CFLAGS are there for a reason?
Well, it started out as one quick question anyway...
It is as safe as compiling them with your own flags.Hmm. Is this safe?They are there cause someone put them there. Not meaning to be silly here just stating that the person who managed the package didn't put the ability to easy recompile. And we are only changing "-O2" to "-O2 XXXXX" and that feels pretty safe to me.Do you think the hardcoded CFLAGS are there for a reason?
Besides if you run into some trouble. Let's say kdm doesn't start(this won't happen; but for the sake of the argument let's say it will). You will come to the console and to repair what you install all you have to do is sudo apt-get install XXXX. rebooot and woops kdm starts.
I've tried kdelibs, kdebase, libx* some other things etc and I haven't seen anything broken. I've seen some packages doens't make a difference(then I just reinstall the old one), but that is a whole other matter.
I'm confused.... way confused....
What I'm trying to do is recompile squid with --enable-follow-x-forwarded-for
(I'm using DansGuardian and want to give different rights to different PCs on my network - like one particular PC can only surf during certain hours - DansGuardian forces squid to see requests from localhost and so all my filtering is busted)
OK .... I managed to follow the above steps minus the CFLAGS stuff and was able to recompile my squid packages - but that just makes them the same as the binaries ??? Correct???
I edited the environment file and now when I echo CFLAGS or CXXFLAGS I get
--enable-follow-x-forwarded-for
Looking at the error file it is trying to run gcc with the code - and it is dumping out...
error code 77 ... in config.log there is an entry
gcc --enable-follow-x-forwarded-for
and that's where the errors start
so what do I need to do so I can recompile squid with that option? Should I modify one of the other files?
Looking in the configure.in file there is lines that start with
AC_ARG_ENABLE(follow-x-forwarded-for
Obviously I'm missing something which will be really obvious to someone.
bump
I need to pass a special flag to the configure script to get a package to compile on ubuntu. The build works with this flag, but when attempting to package it with dpkg-buildpackage, it looks like autoconf is passing the following command line (according to config.log after a failed build):
I need to pass a flag: "--with-xv-path=/usr/lib"Code:It was created by configure, which was generated by GNU Autoconf 2.59. Invocation command line was $ ./configure --prefix=/usr --mandir=${prefix}/share/man --build=x86_64-linux-gnu CFLAGS=-g -O2 -g
What is the correct way to do this with the debian tools?
Bookmarks