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

Re: Failed to create sbuild chroot for cross-compiling



Hi,

Am Montag, 27. August 2018 schrieb Johannes Schauer: 
> Quoting Holger Wansing (2018-08-25 20:30:15)
> > The manpage of sbuild-createchroot contains commandline examples for several
> > use cases, but not for cross-compiling.
> 
> yes, because sbuild-createchroot has nothing to do with cross-compiling.
> chroots that you use to compile natively or cross with sbuild are exactly the
> same. That's why creating a chroot for cross compilation is no different from
> creating a chroot for native compilation.
> 
> To cross compile with sbuild, you give it the --build and --host arguments on
> the command line. It will then pick the right chroot for you but that chroot
> does not need to have anything special in it.

Yes, I already found that out in the meantime.
Thanks for clarifying.

Why I made that assumption: when trying to get sbuild
running for cross-compiling, I got error messages, that made
think I would have to create "some special sort of chroot".

And why did I get such errors: I used the options in a incorrect
form: I wanted to build a package for s390x, and therefore used
--build=s390x or  --arch=s390x. Using --host=s390x (which 
would have been correct) did not seemed correct for me and
the manpage does not explain it in detail.

I thought like one would think when it comes to virtual machines:
there the host is the hardware you are running the VM on.
And the virtual OS is the guest.
Porting this logic to sbuild would mean,  --host=amd64 must
be correct (my laptop, the "host",  is amd64)  but it wasn't.

Maybe that could be made clearer in the sbuild manpage?
 
The manpage of sbuild.conf says it clear:
It uses terms like "architecture we are building on" and
"architecture we are building for".


I just added an example for cross-compiling to the wiki page
of sbuild BTW. 


Thanks
Holger 



-- 
Sent from my Jolla phone
http://www.jolla.com/

Reply to: