ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ltib] Problem with building libcap


From: Peter Barada
Subject: Re: [Ltib] Problem with building libcap
Date: Tue, 27 Sep 2011 10:22:21 -0400
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.21) Gecko/20110831 Lightning/1.0b2 Thunderbird/3.1.13

On 09/27/2011 02:23 AM, Pauli, David, MU wrote:

Hey,

 

> If you "file rpm/BUILD/libca-2.2/libcap/_makenames", you'll see its a cross-compiled executabe, not compiled to run on the host.

 

The file is a 32Bit compiled for PowerPC or cisco 4500. The right one for my board, which image should be made with LTIB. Should it be the developer-system?

The problem is that the Makefile - in the process of building - executes _makenames to create cap_names.h;   _makenames needs to be built by the host compiler, not the target compiler (i.e. by an x86 compiler instead of the PPC compiler).

 

> If you modify the libcap.spec file to use "make HOSTCC="$BUILDCC ..."

 

Where should be the HOSTCC? I don’t know where to search.

In the Makefile where it compiles _makenames.c into _makenames, you need to create a rule(s) to build/link with $(HOSTCC), not $(CC) as $(HOSTCC) is the host compiler and $(CC) is the target compiler.  Then in the libcap.spec files in "%Build" sec you'll find a call to make.  Add 'HOSTCC="$BUILDCC"' before the make target. 

If you "grep BUILDCC `find dist/lfs-5.1 -name '*.spec'`" you'll see plenty of examples where its used in other package .spec files...


-- 
Peter Barada
address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]