Re: cross-compiling alternatives

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

 



On Fre, 2008-06-13 at 17:16 +0200, Enrico Weigelt wrote:
> * Bernd Petrovitsch <bernd@xxxxxxxxx> schrieb:
> 
> > > Basically yes. But if you have a big number of packages (or a huge package) 
> > > which you didn't write yourself, there will be tests which run executables. 
> > > Figuring out what all the tests are supposed to test in a complex unknown 
> > > software project is not trivial.
> > 
> > Yes, you get used to find the relevant lines in config.log and similar
> > with `grep` and similar tools;-)
> 
> Which are different on each package. So you have to configure each package

ACK.

> for each target manually, which leads the whole point of autoconf
> ad absurdum ;-o

Yup.

[...]
> > pkg-config generated (and generates? - I didn't check recently)
> > references to libraries including the full absolute path (which is the
> > one at build time. And at run-time there is usually
> > no /home/bernd/src/... or where some build may just run).
> 
> Recent pkg-config supports sysroot.

FC-6 has "only" 0.21.

> So you simply build your .pc files as usual (w/o sysroot prefix) and
> set the sysroot prefix via env on the pkg-config call.

>From a quick glance over the man page of 0.23, yes.

> > > Can you please explain ? How do the generated pkg_config files look like ?
> > > Ahh, you mean they contain e.g -L/my/build/host/target/environment/opt/foo/lib 
> > > instead of just -L/opt/foo/lib ?
> 
> Then you've got a broken .pc file ;-P

The problem is that the build-time (cross-)linker needs to find the
(cross-compiled) lib under /my/build/host/target/environment/opt/foo/lib
at link time and the shared linker under /opt/foo/lib at run-time.
Hmm, after digging into that old project, it seems that libtool and
the .la files were the problem.

> > Yes. And even worse the compiled lib "foo" had explicit dependencies (on
> > lib "bar") on
> > "/my/build/host/target/environment/opt/bar/lib/libbar.so.1.2.3.4". 
> 
> And that's even more broken.

Yup. Maybe it was a result of my trial to make libtool work somehow ..

> > And BTW pkg-config didn't support the concept of a "DESTDIR" variable
> > (and I don't care about the name of that variable).
> 
> No, why should it ?! It does not install anything.

But it may "use" installed files.

> Probably you're looking for sysroot ?

Yes, very probably.

	Bernd
-- 
Firmix Software GmbH                   http://www.firmix.at/
mobil: +43 664 4416156                 fax: +43 1 7890849-55
          Embedded Linux Development and Services


--
To unsubscribe from this list: send the line "unsubscribe linux-embedded" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Gstreamer Embedded]     [Linux MMC Devel]     [U-Boot V2]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux ARM Kernel]     [Linux OMAP]     [Linux SCSI]

  Powered by Linux