Jump to content

9.1 & kernel-multimedia-2.1.21.0 for athlon-xp


Recommended Posts

johnnyv,

 

Yeh- I just ran across that pdf a few days ago, and retried it. Same result- I just don't get it. Does Mandrake 9.0 and 9.1 hate me? I can't understand how it won't work on generic installs, when I follow the info explicitly as instructed by people who are doing it on the same distro and versions??? It works fine from root console.

 

aru,

I thought your post on the profile file had finally solved it for me with optimizing source builds, but it didn't work. I also tried putting your format for the cflags (of course changing for the xp cpu) in /etc/profile. ~.bash_profile, and .bashrc, and nothing works. Mandrake always reverts to .i686 on any source file I try to compile, and never uses the opt flags, root or user. I've tried many formats of thes cflags for 8 months, and gone back and forth with experts on the forums, to no avail. What am I missing? There has to be some global file in Mandrake I don't know about that is over riding my cflag wherever I put them.

 

wrc1944

Link to comment
Share on other sites

  • Replies 48
  • Created
  • Last Reply

Top Posters In This Topic

aru,

I thought your post on the profile file had finally solved it for me with optimizing source builds, but it didn't work. I also tried putting your format for the cflags (of course changing for the xp cpu) in /etc/profile. ~.bash_profile, and .bashrc, and nothing works. Mandrake always reverts to .i686 on any source file I try to compile, and never uses the opt flags, root or user. I've tried many formats of thes cflags for 8 months, and gone back and forth with experts on the forums, to no avail. What am I missing? There has to be some global file in Mandrake I don't know about that is over riding my cflag wherever I put them.

Maybe you are missing something.

 

Here is a test I've just made to check this stuff:

 

- First I check the rpm rc file:

root@mandrakeusers ~$ rpm --showrc

ARCHITECTURE AND OS:

build arch            : i586

...

RPMRC VALUES:

macrofiles            : /usr/lib/rpm/macros:/usr/lib/rpm/i586-linux/macros:/etc/rpm/macros.specspo:/etc/rpm/macros.db1:/etc/rpm/macros.cdb:/etc/rpm/macros:/etc/rpm/i586-linux/macros:~/.rpmmacros

optflags              : -O2 -fomit-frame-pointer -pipe -march=pentium-mmx -ffast-math -fno-strength-reduce

...

You can see the default cflags listed as optflags.

 

Now I export my own CFLAGS enviroment variables:

root@mandrakeusers ~$ CHOST=i586-pc-linux-gnu

root@mandrakeusers ~$ CFLAGS="-O2 -march=pentium-mmx -mmmx -mno-mmx -ffast-math -funroll-loops -fomit-frame-pointer -falign-functions=2 -falign-jumps=2 -falign-loops=2 -mpreferred-stack-boundary=2 -pipe"

root@mandrakeusers ~$ CXXFLAGS="$CFLAGS"

root@mandrakeusers ~$ export CHOST CFLAGS CXXFLAGS

 

Then I recompile a test rpmpackage to see if the new CFLAGS are working:

root@mandrakeusers ~$ rpmbuild --rebuild --target $CHOST attr-2.0.8-1mdk.src.rpm

Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.51329

+ umask 022

+ cd /usr/src/RPM/BUILD

+ cd /usr/src/RPM/BUILD

+ rm -rf attr-2.0.8

+ /usr/bin/bzip2 -dc /usr/src/RPM/SOURCES/attr-2.0.8.src.tar.bz2

<...>

<striped>

<...>

+ CFLAGS=-O2 -march=pentium-mmx -mmmx -mno-mmx -ffast-math -funroll-loops -fomit-frame-pointer -falign-functions=2 -falign-jumps=2 -falign-loops=2 -mpreferred-stack-boundary=2 -pipe

+ export CFLAGS

+ CXXFLAGS=-O2 -march=pentium-mmx -mmmx -mno-mmx -ffast-math -funroll-loops -fomit-frame-pointer -falign-functions=2 -falign-jumps=2 -falign-loops=2 -mpreferred-stack-boundary=2 -pipe

+ export CXXFLAGS

<...>

<striped>

<...>

gcc -O2 -march=pentium-mmx -mmmx -mno-mmx -ffast-math -funroll-loops -fomit-frame-pointer -falign-functions=2 -falign-jumps=2 -falign-loops=2 -mpreferred-stack-boundary=2 -pipe -g -DDEBUG -funsigned-char -Wall -D_GNU_SOURCE -I./include -DVERSION="2.0.8" -D_FILE_OFFSET_BITS=64 -g -DDEBUG -funsigned-char -Wall -D_GNU_SOURCE -I../include -DVERSION="2.0.8" -D_FILE_OFFSET_BITS=64 -D_REENTRANT -fno-strict-aliasing -c libattr.c  -fPIC -DPIC -o .libs/libattr.lo

<...>

<striped>

<...>

Executing(--clean): /bin/sh -e /var/tmp/rpm-tmp.53336

+ umask 022

+ cd /usr/src/RPM/BUILD

+ rm -rf attr-2.0.8

+ exit 0

root@mandrakeusers ~$

 

As you see the enviroment CHOST and CFLAGS stuff worked like a charm.

 

Ofcourse you'll need to use your own values

Link to comment
Share on other sites

aru,

I don't understand your last post. I'm not having a problem building srpms as root, only as user, in the home directory tree, which I was told was the preferred procedure.

 

Also, I thought the "cflags" stuff was referring to building from source files (not srpms). Now you are utilizing that format with rpms, which I've never seen before.

 

In other words, I know the gcc flags are the same either way- I just thought the "optflags" terminology was used when doing rpms, and the "cflags" was used in the prifile or bash files instead of rpmrc or .rpmrc. Or, doesn't it matter?

 

Your line:

root@mandrakeusers ~$ rpmbuild --rebuild --target $CHOST attr-2.0.8-1mdk.src.rpm

 

confuses me even more. You appear to be building an srpm as root, but now are invoking the $CHOST CFLAGS terminology used for compiling tar.gz source files, when I thought the proper way was the optflags in rpmrc.

 

When I build as root, with rpm --rebuild --target athlon xxxx.srp.rpm, I have no problem. But, as I understand it, I shouldn't do that, and should build as user in my home directory, with a tree and .rpmrc and .rpmmacros file I create specifically for that purpose. Isn't that correct?

 

wrc1944

Link to comment
Share on other sites

Also, I thought the "cflags" stuff was referring to building from source files (not srpms). Now you are utilizing that format with rpms, which I've never seen before.
It is for both cases, is a convention. Checkout the Makefile of your tar.gz package and you'll see that it uses the system CFLAGS if possible (ie, yesterday I rebuilt the last CVS winex using my own CFLAGS). I put the rpm example because it is not as conventional as the tar.gz. You have to remember that a rpm source file is almost the same as a tar.gz source package but more advanced. In both cases the compilation goes through a Makefile (you have to type 'make something' in a tar.gz, and rpm does it for you). Is the Makefile, or the previous configure step, the one that checks for a system $CFLAGS and pases that value to gcc.

 

To see how the rpmbuid uses the $CFLAGS, just check the macros file (/etc/rpm/macros; also you can take a look to rpm --showrc).

There you can see lines like this one:

 

CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ;

 

Which is a bash line saying:

For CFLAGS Use the enviroment variable (system) $CFLAGS, BUT only in case it already exists, if it is not already set (that's the ":-"), then use the default (specified) optflags; finally export CFLAGS (which will be used by the Makefile).

 

So in case you have set a CFLAGS variable rpm will use it, other wise it will use the rpm's optflags.

 

To see how a tar.gz's Makefile uses the CFLAGS check it (normally are the make config or ./configure scripts who check for system CFLAGS and then they passes those values to the Makefile)

 

In the case of the kernel, as I said above

(in the case of kernel compilation I use the optimizations set through the "make menuconfig")
You should select the optimizations from menuconfig or xconfig or whaterver you use. Or specify them inside the Makefile of the kernel in HOSTFLAGS=....

 

 

In other words, I know the gcc flags are the same either way- I just thought the "optflags" terminology was used when doing rpms, and the "cflags" was used in the prifile or bash  files instead of rpmrc or .rpmrc. Or, doesn't it matter?

 

Your line:

root@mandrakeusers ~$ rpmbuild --rebuild --target $CHOST attr-2.0.8-1mdk.src.rpm

 

confuses me even more. You appear to be building an srpm  as root, but now are invoking the $CHOST CFLAGS terminology used for compiling tar.gz source files, when I thought the proper way was the optflags in rpmrc.

See above, I hope my explanation about how rpm checks for the CFLAGS and other env variables will be understandable :)

When I build as root, with rpm --rebuild --target athlon  xxxx.srp.rpm, I have no problem. But, as I understand it, I shouldn't do that, and should build as user in my home directory, with a tree and .rpmrc and .rpmmacros file I create specifically for that purpose. Isn't that correct?

 

wrc1944

That depends on you and to what point do you trust the rpm you are compiling. Is always safer to compile as normal user, but if you know and trust the srpm, then there is no problem in compiling it as root.

 

HTH

 

EDITED:

--------------

OK, I have some time this morning, so I can go through your compilation as "normal user" problem. First I set up a /home/arusabal/RPM/ tree mirroring the system rpm tree at /usr/src/RPM:

arusabal@mandrakeusers ~$ cd ~

arusabal@mandrakeusers ~$ find /usr/src/RPM -type d -exec sh -c 'mkdir -p ${0##*/src/}'  '{}';

arusabal@mandrakeusers ~$

Next I create a temporary building directory:

arusabal@mandrakeusers ~$ mkdir -p RPM/tmp

arusabal@mandrakeusers ~$

Let's check that everything is OK:

arusabal@mandrakeusers ~$ tree ~/RPM

/home/arusabal/RPM

|-- BUILD

|-- RPMS

|   |-- i386

|   |-- i486

|   |-- i586

|   |-- i686

|   |-- k6

|   `-- noarch

|-- SOURCES

|-- SPECS

|-- SRPMS

`-- tmp



12 directories, 0 files

arusabal@mandrakeusers ~$

 

Now I create the user's .rpmmacros:

arusabal@mandrakeusers ~$ cat > ~/.rpmmacros 

%_topdir      /home/arusabal/RPM

%_tmppath     /home/arusabal/RPM/tmp

arusabal@mandrakeusers ~$

 

And finally I try the compilation:

arusabal@mandrakeusers ~$ rpmbuild --rebuild --target $CHOST ~/tmp/attr-2.0.8-1mdk.src.rpm 

....

 

Everything worked like a charm, see that the built package is at ~/RPM/RPMS/i586/

 

arusabal@mandrakeusers ~$ tree ~/RPM

/home/arusabal/RPM

|-- BUILD

|-- RPMS

|   |-- i386

|   |-- i486

|   |-- i586

|   |   |-- attr-2.0.8-1mdk.i586.rpm

|   |   |-- libattr1-2.0.8-1mdk.i586.rpm

|   |   `-- libattr1-devel-2.0.8-1mdk.i586.rpm

|   |-- i686

|   |-- k6

|   `-- noarch

|-- SOURCES

|-- SPECS

|-- SRPMS

`-- tmp



12 directories, 3 files

arusabal@mandrakeusers ~$

 

And as you see, I didn't need to create an .rpmrc file because the optimizations that I wanted to apply went through system enviroment variables :)

Link to comment
Share on other sites

aru,

This helps greatly- Many thanks for your time spent helping me. I still have some questions, as I'm not there yet.

 

1. All I have in my /etc/rpm/macros file is:

 

%_install_langs en_US:en

 

Am I suppose to add my cflags there, and in what format? And I still don't understand why if the flags are there, compiling tar.gz stuff will find them. Don't I have to have the cflags somewhere else? I have been told to place them many places before, and none of them ever work with tar.gz compiles. I have installed and uninstalled many tars before, but can't get my cflags to be adopted, no matter what I do.

 

2.Can I just individually add my cflags in a makefile of ANY extracted tar.gz program after the HOSTFLAGS= after I do ./configure, like you mention about the kernel?

 

3.In your example, that is exactly what I have done (/home tree & .rpmmacros), but it doesn't work when I do, as user:

 

rpm --rebuild --target athlon xxxx.srp.rpm

 

It does work as root, and uses the /usr/lib/RPM/rpmrc file athlon optflags.

 

 

4. You seem to be saying I can pass cflags to the rpm --rebuild without even needing either the Mandrake /usr/src/RPM/rpmrc OR the /home/wrc1944/.rpmrc files by inserting "--target $CHOST ~/tmp/" (instead of --target athlon), and then the srpm file I wish to rebuild.

 

In your last post your line was:root@mandrakeusers ~$ rpmbuild --rebuild --target $CHOST attr-2.0.8-1mdk.src.rpm

 

which leaves out the ~/tmp/ part, and confuses me. I don't understand why you mention two versions of this line. Is the ~/tmp/ added when I build as user so as to use the tree in /home/wrc1944, and omitted when I build as root?

 

5. I still fail to understand where the cflags should be placed so that tar compiles adopt them. Nothing anybody on many forums has said has ever worked for me. This is on generic fully functioning Mandrake 8.2, 9.0, or 9.1 installs, with all devel packages.

 

I guess I need the exact info how to set up the system environment variable, and/or where (what file) to place the system cflags I want, because Mandrake apparently hasn't done it. And, nothing in 8 months of trying by following advice on the forums about cflags formats or files to place them has worked either. I do think I'm getting closer, with what I'm learning from your efforts.

 

6. AM I correct in understanding that what you are telling me is that both rpm rebuilding AND compiling tars will use the same cflags I specify in system environment variables, building as user or root, if I either use --target $CHOST, or alternately, put them in the makefile after I ./configure a tar?

 

Sorry to be so dense about this, but nothing seems to work so far.

 

wrc1944

Link to comment
Share on other sites

aru,

This helps greatly- Many thanks for your time spent helping me. I still have some questions, as I'm not there yet.

 

1. All I have in my /etc/rpm/macros file is:

 

%_install_langs en_US:en

 

Am I suppose to add my cflags there, and in what format? And I still don't understand why if the flags are there, compiling tar.gz stuff will find them. Don't I have to have the cflags somewhere else? I have been told to place them many places before, and none of them ever work with tar.gz compiles. I have installed and uninstalled many tars before, but can't get my cflags to be adopted, no matter what I do.

Probably part of the failure is there, my /etc/rpm/macros file is 153 lines long. Maybe you deleted sometime ago part of it. Maybe you need to reinstall your rpm packages.

 

IMHO you don't need to edit your /etc/rpm/macros file at all.

 

About the CFLAGS, just set them as environment variables somewhere in your profile scripts (I suggest you to use the way I posted in my former post in this thread) and forget about them, because they will be there to be used whenever you compile something.

 

2.Can I just individually add my cflags in a makefile of ANY extracted tar.gz program after the HOSTFLAGS= after I do ./configure, like you mention about the kernel?

Sure, but not after.

I meant before you do the configure step.

My advice here is that if you don't want to use the CFLAGS you set in your profile scripts, you should run an "export CFLAGS=your new flags" before starting the compilation (I mean before running the make config or ./configure)

 

In the case of the kernel compilation you can edit that HOSTFLAGS variable inside its Makefile, but I prefer to use the default optimizations provided by the selection of architecture at the configuration menu.

 

3.In your example, that is exactly what I have done (/home tree & .rpmmacros), but it doesn't work when I do, as user:

 

rpm --rebuild --target athlon xxxx.srp.rpm

 

It does work as root, and uses the /usr/lib/RPM/rpmrc file athlon optflags.

That's strange. I suggest you to remove every rpm related stuff on your home dir (or better, create a new user with a virgin directory) and repeat my example --remember the issue with your /etc/rpm/macros file and before trying anything reinstall your rpm related packages.

 

 

4. You seem to be saying I can pass cflags to the rpm --rebuild without even needing either the Mandrake /usr/src/RPM/rpmrc OR the /home/wrc1944/.rpmrc  files by inserting "--target $CHOST ~/tmp/" (instead of --target athlon), and then the srpm file I wish to rebuild.

 

In your last post your line was:root@mandrakeusers ~$ rpmbuild --rebuild --target $CHOST attr-2.0.8-1mdk.src.rpm

 

which leaves out the ~/tmp/ part, and confuses me. I don't understand why you mention two versions of this line. Is the ~/tmp/ added when I build as user so as to use the tree in /home/wrc1944, and omitted when I build as root?

I'm not saying that *you can* pass CFLAGS and CXXFLAGS to rpm; I'm saying that if you have already set them as environment variables they will pass by their own (and that is how it is meant to be). Only in case you didn't set them then rpm will look for the specific optflags from its configuration file :)

 

Don't get confused about the $CHOST, because is the same to put i586-mandrake-linux-gnu or symply i586 --In your case athlon or athlon-mandrake-linux-gnu

 

Also don't get confused by the directory where is the rpmpackage :) In my first example It was in my home directory, but later I moved it to my ~/tmp dir. That has nothing to do with our issue.

 

5. I still fail to understand where the cflags should be placed so that tar compiles adopt them. Nothing anybody on many forums has said has ever worked for me. This is on generic fully functioning Mandrake 8.2, 9.0, or 9.1 installs, with all devel packages.

 

I guess I need the exact info how to set up the system environment variable, and/or where (what file) to place the system cflags I want, because Mandrake apparently hasn't done it. And, nothing in 8 months of trying by following advice on the forums about cflags formats or files to place them has worked either. I do think I'm getting closer, with what I'm learning from your efforts. 

A compilation is a compilation, doesn't matter if the source code is in a tar.gz a tar.bz2, a .deb or a .rpm package. UNIX is an old operating system with strong conventions, and one of those strong old conventions are the compilation enviroment variables such as CFLAGS. So the redhat guys who created rpm knew this and they set resorts for using such enviroment variables.

 

If you have already set them, in *most* of the cases you compile something (tar.gz, rpm...) they will be used by default w/o you to do anything

 

About where to put them I suggest to put them as I explained in my former post in this thread. ;)

6. AM I correct in understanding that what you are telling me is that both rpm rebuilding AND compiling tars will use the same cflags I specify in system environment variables, building as user or root, if I either use --target $CHOST, or alternately, put them in the makefile after I ./configure a tar?

Both rpm and tars will use the enviroment flags (if they use standard procedures).

It will depend on where you set them if all the users will able to use them or only a few. If you set them in "system wide" profile files (such as my example) every user will use them. If you set them in a user's bash_profile, then only that user will use them.

Again dont get confused about the --target $CHOST; you'll use the enviroment CFLAGS if they are set, whatever you use "--target $CHOST" or not (if you don't use that rpm will use its default target i586 for the rpm package name).

 

Sorry to be so dense about this, but nothing seems to work so far.

 

wrc1944

Don't worry I, as many other people here, have fun with this things :D

I only hope that my english is enough clear to explain myself :P

Link to comment
Share on other sites

aru,

That was the first thing I did when I first saw your post, but it didn't work. I put the exact lines below (edited with my athlon flags), as you instructed, creating a cflags.sh file in /etc/profile.d.

 

 

# cflags.sh -- Compile flags for gcc3

CHOST="i586-mandrake-linux-gnu"

CFLAGS="-O2 -march=pentium-mmx -mmmx -mno-mmx -ffast-math -funroll-loops -fomit-frame-pointer -falign-functions=2 -falign-jumps=2 -falign-loops=2 -mpreferred-stack-boundary=2 -pipe"

CXXFLAGS=${CFLAGS}

export HOST CFLAGS CXXFLAGS[

 

 

I then tried putting those exact lines in /etc/profile, /home/wrc1944/.bash_profile, /etc/bashrc, and /home/wrc1944/.bashrc. Nothing worked. I've been trying stuff like this for 8 months, on many fresh installs of three versions of Mandrake.

 

Could you please send me a copy of your working file where the cflag environment variable is located? Perhaps seeing that in context would enlighten me.

 

I'll now try creating a new user, and following your exact previous example. But if I don't have the variable set correctly, how can that work? My problem with the rpm rebuilding seems to be that as user, rpm insists on trying to write to the root /usr/src/RPM/SOURCES instead of using the /home/wrc1944 tree directories. Apparently, it finds the optflags in the ~/.rpmrc file OK.

 

Thanks again,

wrc1944 (Robert Crawford

Link to comment
Share on other sites

aru,

 

I created a new user with a virgin /home, and did your example exactly (made sure I made no errors- the tree and rpmmacros file is correct), and get the same error. I created an /home/rob44/.rpmrc file using the one CyberCFO uses, since my cflags environment variable isn't set up correctly (if at all).

 

 

[rob44@localhost rob44]$ cd /home/rob44/srpms

[rob44@localhost srpms]$ rpm --rebuild --target athlon gcc-3.2.2-3mdk.src.rpm

Installing gcc-3.2.2-3mdk.src.rpm

error: cannot create %sourcedir /      /home/rob44/RPM/SOURCES

error: gcc-3.2.2-3mdk.src.rpm cannot be installed

[rob44@localhost srpms]$

 

Here's a link to the pclinuxonline discussion where Ranger is trying to help me also. Maybe if you looked at it, something would jump out- he's having me try a few things, and I posted some outputs of some commands he said to do.

 

http://www.pclinuxonline.com/modules.php?m...c=1080&forum=11

Link to comment
Share on other sites

Lets go by parts if you don't mind :)

 

First lets solve your compilation problems as normal user, and later we will resume the CFLAGS discussion, as both problems aren't related one eachother, and the only thing we do by mixing them is confuse you even more (not talking about your dual-forum affair ;) ).

 

In case you are more interested in the CFLAGS issue tell me and we will go through it.

 

error: cannot create %sourcedir /      /home/rob44/RPM/SOURCES

That's a really strange error, probably is just a typo in your post, but could you please confirm that that was the exact error string

 

I'm saying that, because that error should be something like this

error: cannot create %sourcedir /home/rob44/RPM/SOURCES

 

If your error is what it looks like, then you have something wrong with your /usr/lib/rpm/macros file

 

Please confirm that your error is as you showed and wasn't a typo

 

There is other way in that we can easily check if the error is related to the value of %sourcedir . OK, run first as root this command and report it's output:

root@mandrakeusers ~$ rpm --eval %_sourcedir

/usr/src/RPM/SOURCES

root@mandrakeusers ~$

And now run it as normal user:

arusabal@mandrakeusers ~$ rpm --eval %_sourcedir

/home/arusabal/RPM/SOURCES

arusabal@mandrakeusers ~$

 

Post your results, and lets see if that is related to your problems.

Link to comment
Share on other sites

I found a pdf on compiling src.rpms for 9.0 it seems quite usefull and explains how to setup a build environment

http://cybercfo.gkmweb.com/mandrake_a_la_gentoo.pdf

 

Thanks for the link :)

 

I downloaded that file the other day and sadly I haven't got the time to take a look to it. I'm reading it right now, and provided that I've been thinking of a glibc upgrade for a while, and that I know that that will be a pain in my mdk8.1 no matter how I'll do it, I've realised that the way purposed in that document will be the funniest one! :D

 

I'll attempt that in the following days.

Link to comment
Share on other sites

Here's the exact error- it was not a typo.

 

[rob44@localhost rob44]$ cd /home/rob44/srpms

[rob44@localhost srpms]$ rpm --rebuild --target athlon gcc-3.2.2-3mdk.src.rpm

Installing gcc-3.2.2-3mdk.src.rpm

error: cannot create %sourcedir /      /home/rob44/RPM/SOURCES

error: gcc-3.2.2-3mdk.src.rpm cannot be installed

[rob44@localhost srpms]$

------------------------------------------------

 

Here's the other ouput you requested, as new user, and root, and original user, and root:

 

[rob44@localhost rob44]$ rpm --eval %_sourcedir

      /home/rob44/RPM/SOURCES

[rob44@localhost rob44]$ su

Password:

[root@localhost rob44]# rpm --eval %_sourcedir

/usr/src/RPM/SOURCES

[root@localhost rob44]#

 

---------------------------------------------------

 

[wrc1944@localhost wrc1944]$ rpm --eval %_sourcedir

/usr/src/RPM/SOURCES

[wrc1944@localhost wrc1944]$ su

Password:

[root@localhost wrc1944]# rpm --eval %_sourcedir

/usr/src/RPM/SOURCES

[root@localhost wrc1944]#

 

I guess this confirms rpm is trying to write to /usr/src/RPM/SOURCES when I try

to build as the original user, and apparently is correctly doing it as the new virgin user.

 

wrc1944

Link to comment
Share on other sites

Here's the exact error- it was not a typo.

 

That, IMHO, confirms that you have corrupted somehow your macros files. My advice is to reinstall the rpm build/rebuild related packages to restore all the default macros and configuration files. :(

 

reinstall them as:

 

rpm -Uvh --replacepkgs --replacefiles rpm-stuff.rpm

Link to comment
Share on other sites

OK- I'll do so, but some questions.

 

1. Doesn't this seem strange, seeing as how this happens on 3 different machines, 5 different hard drives, many different installs, and 3 different Mandrake versions? How can I be getting the same corruption on all these machines and drives, unless all three different sets of cd's have the same errors on them. I find this highly unlikely, but at this point, I'll try anything.

 

2. Is that the correct line you gave me, specifically the "rpm-stuff.rpm" portion?

I've never heard of a command "-stuff" included in a line.

 

I have installed:

 

rpm-build

rpm-devel

rpm-rebuilder

rpmdrake

rpmlint

rpmstats

rpmtools

 

How about removing them all in MCC, and then reinstalling from there? Or is the command lin as root the better method?

 

On the Cflags problem- Since I've tried the location as your first post suggested, and didn't have any luck, I'd still like to see acopy of your working file whee I can study it in context. Or, if I fix the macros problem, will that also fix the cflags in the process?

 

Thanks much,

wrc1944

Link to comment
Share on other sites

OK- I'll do so, but  some questions. 

 

1. Doesn't this seem strange, seeing as how this happens on 3 different machines, 5 different hard drives, many different installs, and 3 different Mandrake versions? How can I be getting the same corruption on all these machines and drives, unless all three different sets of cd's have the same errors on them. I find this highly unlikely, but at this point, I'll try anything.

I understand you, but I cannot help about the other times it went wrong, I only can give help in what I see right now, and my best bet is that you have the macro files corrupted (I can be wrong ofcourse).

 

2. Is that the correct line you gave me, specifically the "rpm-stuff.rpm" portion? 

I've never heard of a command "-stuff" included in a line.

 

I have installed:

 

rpm-build

rpm-devel

rpm-rebuilder

rpmdrake

rpmlint

rpmstats

rpmtools

No, with -stuff I meant the version number of the rpm packages you use. Since you have all those packages installed, I suggest you to download from internet the same verisons you already have, into a new directory. Once the download is completed, reinstall all of them at the same time:

 

rpm -Uvh --upgradepkgs --upgradefiles *.rpm

 

This time is the exact command you have to type.

 

How about removing them all in MCC, and then reinstalling from there?  Or is the command lin as root the better method?

go safe and run the above command in commandline mode as root, dont use MCC for this.

 

On the Cflags problem- Since I've tried the location as your first post suggested, and didn't have any luck, I'd still like to see acopy of your working file whee I can study it in context. Or, if I fix the macros problem, will that also fix the cflags in the process?
I think that if you can use the CFLAGS with tarballs, but not with rpmrebuild, and provided that you have strange/corrupted macros files, the problem is that.

 

Here is my /etc/profile.d/cflags.sh script:

#!/bin/bash



############################################################

# Mientras encuentro las optimizaciones correctas para mis 

# PentiumMMX, aqui almacenare las que mas se aproximen

# 

# CFLAGS_GCCver_FUENTE

# Junio 2002

############################################################



############################################################

# Optimizaciones del Securing Optimizing de RedHat (MMX)

############################################################

CFLAGS_296_RH='-O3 -march=pentium -mcpu=pentium -ffast-math -funroll-loops -fomit-frame-pointer -fforce-mem -fforce-addr -malign-double -fno-exceptions -pipe'



############################################################

# Optimizaciones sacadas del rpmrc de MDK  para pentium

############################################################

CFLAGS_296_MDK='-O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -ffast-math -fno-strength-reduce'



############################################################

# Articulo de Bulma para MMX (igual que para pentium) usar:

############################################################

CFLAGS_296_BULMA='-O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i586'



###########################################################

# Mis optimizaciones 8)

##########################################################

CFLAGS_296_MIO='-O2 -march=pentium -ffast-math -funroll-loops -fomit-frame-pointer -malign-functions=2 -malign-jumps=2 -malign-loops=2 -mpreferred-stack-boundary=2 -pipe'



###########################################################

# GCC 3.1 para MMX

###########################################################

CFLAGS_310_MIO='-O2 -march=pentium-mmx -mmmx -mno-mmx -ffast-math -funroll-loops -fomit-frame-pointer -falign-functions=2 -falign-jumps=2 -falign-loops=2 -mpreferred-stack-boundary=2 -pipe'



###########################################################

# Elegir la mejor y exportarla

###########################################################

case $(gcc -v 2>&1|sed -n 's/gcc version //p;') in

       2.*) CFLAGS=$CFLAGS_296_MIO;;

       3.*) CFLAGS=$CFLAGS_310_MIO;;

       *) CFLAGS="-O2";;

esac

CXXFLAGS=$CFLAGS

CHOST=i586-mandrake-linux-gnu

WANT_AUTOCONF_2_5=1  #si autoconf falla, usar 0

export CFLAGS CXXFLAGS CHOST WANT_AUTOCONF_2_5



############################################################

# Fuera basura

############################################################

unset CFLAGS_296_RH CFLAGS_296_MDK CFLAGS_296_BULMA CFLAGS_296_MIO CFLAGS_310_MIO

 

Don't get confused for all the stuff you see, you can achieve the same, with the following:

#! /bin/bash

CFLAGS="your cflags"

CXXFLAGS=$CFLAGS

CHOST=athlon



export CFLAGS CXXFLAGS CHOST

Link to comment
Share on other sites

Thanks, aru,

I'll do exactly as you have instructed about downloading the rpms, and recheck my /etc/profile.d/cflags.sh file.

 

Wouldn't it be a good idea to backup any current macro files, to compare with later in case rpm rebuilding still want work as user after I reinstall the rpm packages? If so, which files would that include?

 

wrc1944

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share


×
×
  • Create New...