Void Linux discussion
 help / color / mirror / Atom feed
* xbps-src: lost in cross-build, aka on makedepends vs hostmakedepends
@ 2015-09-28 10:24 Pierre Bourgin
  2015-09-28 12:13 ` Stefan Mühlinghaus
  2015-09-28 13:52 ` Stefan Mühlinghaus
  0 siblings, 2 replies; 4+ messages in thread
From: Pierre Bourgin @ 2015-09-28 10:24 UTC (permalink / raw)
  To: voidlinux


[-- Attachment #1.1: Type: text/plain, Size: 760 bytes --]

Hello,

While trying to create new packages, I'm a completely lost with 
cross-building.
Although my packagings are fine on native building, they fail a lot on 
cross-build x86_64 to armv7hf for instance.
(example: https://github.com/voidlinux/void-packages/pull/2612)

I think I miss some concepts on cross-building ...
Do you have advices/rules on when put a given dependency into 
hostmakedepends instead of makedepends in a template file ?
Why not put all depedencies in hostmakedepends for instance ?

Examples of dependencies to manage for cross-build: python, qt-devel, vala.

I've carrefully checked xbps-src/Manual.md (nothing usefull for this) and 
checked various templates as examples, but I can't figure out :(

Many thanks for your help !
Pierre

[-- Attachment #1.2: Type: text/html, Size: 837 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: xbps-src: lost in cross-build, aka on makedepends vs hostmakedepends
  2015-09-28 10:24 xbps-src: lost in cross-build, aka on makedepends vs hostmakedepends Pierre Bourgin
@ 2015-09-28 12:13 ` Stefan Mühlinghaus
  2015-09-28 13:23   ` Pierre Bourgin
  2015-09-28 13:52 ` Stefan Mühlinghaus
  1 sibling, 1 reply; 4+ messages in thread
From: Stefan Mühlinghaus @ 2015-09-28 12:13 UTC (permalink / raw)
  To: voidlinux


[-- Attachment #1.1: Type: text/plain, Size: 810 bytes --]

Maybe my previous post here 
<https://groups.google.com/d/msg/voidlinux/WVcjzZ7eEME/z4DACiUKcZwJ> can 
shed some light :)

Here is a ficticious example: A package may need tools like "cmake" and 
"pkg-config" to run through its build-process and the "qt" library is 
needed to build and execute it. These would be the different dependencies:

*hostmakedepends:* cmake, pkg-config
Installed and executed on the host in its architecture to run through the 
build process

*makedepends:* qt-devel
For compiling purposes the -devel variant of a library is needed. These 
dependencies are automatically installed seperately for each target 
architecture

*depends:* qt
Needed to run the program on the target system. This is automatically 
detected in many cases so you probably will not need to specify it at all.

[-- Attachment #1.2: Type: text/html, Size: 1005 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: xbps-src: lost in cross-build, aka on makedepends vs hostmakedepends
  2015-09-28 12:13 ` Stefan Mühlinghaus
@ 2015-09-28 13:23   ` Pierre Bourgin
  0 siblings, 0 replies; 4+ messages in thread
From: Pierre Bourgin @ 2015-09-28 13:23 UTC (permalink / raw)
  To: voidlinux


[-- Attachment #1.1: Type: text/plain, Size: 718 bytes --]


Sorry, I missed your previous post before asking ...
Thanks for sharing your knowledge !

If I understand well regarding your example, *cmake* has to be *only* in 
*hostmakedepends* (and not makedepends) for cross-compiling on x86_64 for 
armv7 arch.

If not, I mean if cmake was listed in makedepends: 
call of cmake won't work, because its runtime will be an armv7 binary then, 
that can't be runned on x86_64 arch (which is cross-compiling).

So the rule for cross-building is: 
all stuff that need to be runtimed/executed during the build process (and 
not only linked/generated) has to be in *hostmakedepends* in order to have 
the right binary platform type (native and not cross-target architecture).

right ?

[-- Attachment #1.2: Type: text/html, Size: 812 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: xbps-src: lost in cross-build, aka on makedepends vs hostmakedepends
  2015-09-28 10:24 xbps-src: lost in cross-build, aka on makedepends vs hostmakedepends Pierre Bourgin
  2015-09-28 12:13 ` Stefan Mühlinghaus
@ 2015-09-28 13:52 ` Stefan Mühlinghaus
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Mühlinghaus @ 2015-09-28 13:52 UTC (permalink / raw)
  To: voidlinux


[-- Attachment #1.1: Type: text/plain, Size: 211 bytes --]

Right. In some cases it may well be true that one package shows up in both 
hostmakedepends and makedepends when it is needed on the host for 
processing AND for compiling to the different target architectures.

[-- Attachment #1.2: Type: text/html, Size: 229 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-09-28 13:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-28 10:24 xbps-src: lost in cross-build, aka on makedepends vs hostmakedepends Pierre Bourgin
2015-09-28 12:13 ` Stefan Mühlinghaus
2015-09-28 13:23   ` Pierre Bourgin
2015-09-28 13:52 ` Stefan Mühlinghaus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).