Round One - I did LFS pretty much by the book and installed the needed
dependencies by the LFS book - lua and elfutils are optional but not in
blfs so I didn't build them.
Python 2 is in the book but make test fails a few tests, probably
because of lack of network - but rpm with python support fails to
compile. I'll investigate later.
Before I started bootstrapping I did something hackish and removed the
{,/usr}/lib64 symlinks, moving the lib to lib64, and then moving none
lib64 stuff (like locale) back. It seemed to work.
The configure system of rpm appears to be broken. It does not detect
that I am linux, but instead uses none. However, config.guess does
correctly identify me as linux. Output of config.guess is same as on any
linux distribution. The compiled binary however does know I'm linux.
So the result is rpmbuild looks for linux macros that aren't there, and
very basic macros like %{_arch} are not defined.
cd /usr/lib/rpm/platforms
cp -ar x86_64-none x86_64-linux
cp -ar noarch-none noarch-linux
fixes that issue.
rpmbuild though then failed to build shared libraries
editing /usr/lib/rpm/macros
and changing
%_host x86_64-pc-none
to
%_host x86_64-pc-linux
and
%_host_os none
to
%_host_os linux
seemed to fix that. Now it would build shared libraries, but it could
not extract the dependency or provides information, it was missing the
tools to do that.
Apparently elfutils is not optional, and I wondered if not having it was
what caused the platform mis-detection during configure.
So I installed elfutils, it's install file indicated it was a
simple ./configure && make && make install.
Installing elfutils however broke the compiler. And that is exactly why
I want a proper package management system. My guess is elfutils install
replaced something in the tool chain.
Round 2 - Fortunately I had a second LFS root and scripts for building
LFS (CH5 and CH6) - so I started over from within that root, but this
time modifying the scripts to use {,/usr}/lib64 from the start. That way
it would be cleaner.
There were a few issues:
glibc - the localedef program wants to use /usr/lib64/locale which is
wrong. I did not see an obvious configure switch to make it do the right
thing, probably need to run a post configure sed on a makefile but for
now I manually moved the directory and made a symlink so localedef used
by other programs can find it.
udev - the custom lfs makefile needed a few edits for lib64, I have a
patch if anyone interested, seems to work just fine.
libkmod - it put the libraries in the right place and the .pc file was
correct but it installed into /usr/lib/pkgconfig instead
of /usr/lib64/pkgconfig.
One package from blfs - either nspr or nss (nss I think) put its
libraries in wrong place but it did not have a configure script, so I
suspect a sed will fix that in the future. I manually moved them.
This time I did not build python, I will build python inside of rpm once
I have the system bootstrapped. That will make it easier to try
different configure switches to see if I can get rpm to build against
it. I also did not build elfutils. First I'm going to bootstrap the
system using rpms that don't have the automated dependency stuff, that
way I can build elfutils inside rpm and it will be easier to see what it
conflicts with that broke the compiler, and I can remove it if need be.
But anyway, now I'm in a clean LFS 7.3 with a separate {,/usr}/lib64 and
at least a primitive but working rpm. Tested by building the Fedora 18
lua rpm (it's not in blfs and Fedora has some nice patches that make it
easier to get as a shared library) - it built and installed perfectly :)
So now I'm busy writing spec files, test building them in Fedora 18
(where I can use rpmlint to find issues - mostly documentation that
isn't utf8, iconv usually fixes them - often it's a changelog or old man
page)
nspr and nss are first since one of them (nss I think) wasn't a clean
install into lib64, then I'll go in the order of the book - hopefully
figuring out how to get localedef to use /usr/lib/locale
So - sorry for the length, but I don't have a blog ;) and I thought
someone might be interested.
--
http://linuxfromscratch.org/mailman/listinfo/lfs-chat
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page