[ELDK] pcap library and tcpdump in ELDK

Wolfgang Denk wd at denx.de
Mon Oct 20 20:54:26 CEST 2008


Dear "Dave Rensberger",

In message <B7BC4CB64CA090478F283BA589292737577C18 at abtg-mail.ambientcorp.com> you wrote:
> Are the instructions on
> http://www.denx.de/wiki/view/DULG/ELDKRebuildingComponents
> still valid?

Yes, it is.

> Whenever I do this, the rpmbuild succeeds in producing binary rpms in
> the ppc/ directory, but if I inspect the resultant libraries with
> readelf, it says that they're actually x86 binaries.   During the build
> process, it appears that my system compiler, rather than the
> cross-compiler is being called.

Then you probably did not read the second bullet item below:

        The <ELDK_root>/usr/ppc-linux/bin directory must be in PATH
        before the /usr/bin directory. This is to make sure that the
        command gcc results in the fact that the ELDK cross compiler
        is invoked, rather than the host gcc.

> I also get a weird error when installing the binary RPM:
> 
> My-host> ${CROSS_COMPILE}rpm -i
> usr/src/denx/RPMS/ppc/libpcap-ppc_4xx-0.9.8-2.ppc.rpm 
> /sbin/ldconfig: Can't create temporary cache file /etc/ld.so.cache~:
> Permission denied
> error: %post(libpcap-ppc_4xx-0.9.8-2.ppc) scriptlet failed, exit status
> 1

Assuming your RPM was build correctly (i. e. it is indeed referencing
the /opt/eldk/ppc_4xx/etc/ld.so.cache file, not your host system's
/etc/ld.so.cache), then the directory permissions in your target root
file system prevent you from doing this.

But given the error message above I speculate that you might in  fact
attempt  to overwrite your host system's /etc/ld.so.cache file, which
would be not a good thing to do.

> It seems like something isn't fully aware of the cross-compilation
> environment.   I have the "CROSS_COMPILE" variable set and the directory
> containing the denx toolchain is first in my path (did this via the
> eldk_init script).  Do I need to additionally set "CC" or something (I

This is NOT enough.

> tried this once, and it made some other problems).

Please see the last bullet in "3.7.2. Rebuilding Target Packages",
http://www.denx.de/wiki/view/DULG/ELDKRebuildingComponents#Section_3.7.2.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Ja, mach' nur einen Plan,    sei nur ein grosses Licht
und mach' dann noch 'nen zweiten Plan,    geh'n tun sie beide nicht."
                                     -- Bert Brecht, Dreigroschenoper


More information about the eldk mailing list