Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #236164 > unrolled thread

Cross compilation error

Started byJonathan Tremesaygues <jonathan.tremesaygues@sereema.com>
First post2021-06-16 16:40 +0200
Last post2021-06-18 02:20 +0200
Articles 7 — 4 participants

Back to article view | Back to linux.debian.user


Contents

  Cross compilation error Jonathan Tremesaygues <jonathan.tremesaygues@sereema.com> - 2021-06-16 16:40 +0200
    Re: Cross compilation error Georgi Naplatanov <gosho@oles.biz> - 2021-06-16 18:00 +0200
      Re: Cross compilation error Jonathan Tremesaygues <jonathan.tremesaygues@sereema.com> - 2021-06-16 18:10 +0200
        Re: Cross compilation error <tomas@tuxteam.de> - 2021-06-16 18:20 +0200
          Re: Cross compilation error Paul Wise <pabs@debian.org> - 2021-06-17 06:20 +0200
            Re: Cross compilation error Jonathan Tremesaygues <jonathan.tremesaygues@sereema.com> - 2021-06-17 08:50 +0200
              Re: Cross compilation error Paul Wise <pabs@debian.org> - 2021-06-18 02:20 +0200

#236164 — Cross compilation error

FromJonathan Tremesaygues <jonathan.tremesaygues@sereema.com>
Date2021-06-16 16:40 +0200
SubjectCross compilation error
Message-ID<CqERY-3Rx-5@gated-at.bofh.it>
Hi,

I’m using Debian Buster amd64 and I try to cross-compile ppp for armhf.

I never cross-compiled before so I have followed this guide: 
https://wiki.debian.org/CrossCompiling#Building_with_dpkg-buildpackage

A paste of my actions is available here: http://paste.debian.net/1201433/

If I understand the error, the compiler search for the amd64 version of 
the libssl-dev’s headers instead of the armhf one. But I don’t 
understand why. Any idea or clue?

Best regards,

Jonathan T.

[toc] | [next] | [standalone]


#236166

FromGeorgi Naplatanov <gosho@oles.biz>
Date2021-06-16 18:00 +0200
Message-ID<CqG7n-4Az-3@gated-at.bofh.it>
In reply to#236164
On 6/16/21 5:39 PM, Jonathan Tremesaygues wrote:
> Hi,
> 
> I’m using Debian Buster amd64 and I try to cross-compile ppp for armhf.
> 
> I never cross-compiled before so I have followed this guide:
> https://wiki.debian.org/CrossCompiling#Building_with_dpkg-buildpackage
> 
> A paste of my actions is available here: http://paste.debian.net/1201433/
> 
> If I understand the error, the compiler search for the amd64 version of
> the libssl-dev’s headers instead of the armhf one. But I don’t
> understand why. Any idea or clue?
> 
> Best regards,
> 
> Jonathan T.
> 

Hi Jonathan,

probably this warning is the issue.

"dpkg-architecture: warning: specified GNU system type
arm-linux-gnueabihf does not match CC system type x86_64-linux-gnu, try
setting a correct CC environment variable"

The environment variable CC should contain the path to the compiler for
armhf architecture not for amd64 one.

HTH

Kind regards
Georgi

[toc] | [prev] | [next] | [standalone]


#236167

FromJonathan Tremesaygues <jonathan.tremesaygues@sereema.com>
Date2021-06-16 18:10 +0200
Message-ID<CqGh3-4T8-3@gated-at.bofh.it>
In reply to#236166
On 16/06/2021 17:55, Georgi Naplatanov wrote:
> On 6/16/21 5:39 PM, Jonathan Tremesaygues wrote:
>> Hi,
>>
>> I’m using Debian Buster amd64 and I try to cross-compile ppp for armhf.
>>
>> I never cross-compiled before so I have followed this guide:
>> https://wiki.debian.org/CrossCompiling#Building_with_dpkg-buildpackage
>>
>> A paste of my actions is available here: http://paste.debian.net/1201433/
>>
>> If I understand the error, the compiler search for the amd64 version of
>> the libssl-dev’s headers instead of the armhf one. But I don’t
>> understand why. Any idea or clue?
>>
>> Best regards,
>>
>> Jonathan T.
>>
> 
> Hi Jonathan,
> 
> probably this warning is the issue.
> 
> "dpkg-architecture: warning: specified GNU system type
> arm-linux-gnueabihf does not match CC system type x86_64-linux-gnu, try
> setting a correct CC environment variable"
> 
> The environment variable CC should contain the path to the compiler for
> armhf architecture not for amd64 one.
> 
> HTH
> 
> Kind regards
> Georgi
> 

It’s look like you are right. By setting CC to arm-linux-gnueabihf-gcc, 
I was able to compile the package.

But it is not the job of ’dpkg-buildpackage -a<arch>’ to set the right 
compiler and other stuff? Neither the wiki, the manpage nor the 
unofficial guides found on Internet say I have to set manually the 
compiler :-/


Jo

[toc] | [prev] | [next] | [standalone]


#236168

From<tomas@tuxteam.de>
Date2021-06-16 18:20 +0200
Message-ID<CqGqK-4Wm-13@gated-at.bofh.it>
In reply to#236167

[Multipart message — attachments visible in raw view] — view raw

On Wed, Jun 16, 2021 at 06:07:00PM +0200, Jonathan Tremesaygues wrote:
> On 16/06/2021 17:55, Georgi Naplatanov wrote:

[...]

> >The environment variable CC should contain the path to the compiler for
> >armhf architecture not for amd64 one.
> >
> >HTH
> >
> >Kind regards
> >Georgi
> >
> 
> It’s look like you are right. By setting CC to
> arm-linux-gnueabihf-gcc, I was able to compile the package.
> 
> But it is not the job of ’dpkg-buildpackage -a<arch>’ to set the
> right compiler and other stuff? Neither the wiki, the manpage nor
> the unofficial guides found on Internet say I have to set manually
> the compiler :-/

It should, I think.

You might like to take this to <debian-cross@lists.debian.org>,
there are pretty knowledgeable folks there.

Cheers
 - t

[toc] | [prev] | [next] | [standalone]


#236173

FromPaul Wise <pabs@debian.org>
Date2021-06-17 06:20 +0200
Message-ID<CqRFv-3kh-1@gated-at.bofh.it>
In reply to#236168

[Multipart message — attachments visible in raw view] — view raw

tomas wrote:
> On Wed, Jun 16, 2021 at 06:07:00PM +0200, Jonathan Tremesaygues wrote:
> > But it is not the job of ’dpkg-buildpackage -a<arch>’ to set the
> > right compiler and other stuff? Neither the wiki, the manpage nor
> > the unofficial guides found on Internet say I have to set manually
> > the compiler :-/
> 
> It should, I think.

Looks like the cross build QA service sees the same failure:

   http://crossqa.debian.net/src/ppp

I think that this means the package doesn't support being cross built
yet due to problems in the packaging.

I noticed that if I replace this line in debian/rules:

   ./configure --prefix=/usr

With this line:

   ./configure --prefix=/usr --cc=gcc --cross_compile="$(DEB_HOST_GNU_TYPE)-"

Then the cross build starts working.

Would you like to file a bug report about this issue?

If so, run this command:

   reportbug --source ppp

Make sure to use these headers and pseudo-headers:

   Subject: ppp: FTCBFS -- uses the build architecture compiler
   
   Source: ppp
   Version: 2.4.9-1+1
   Severity: normal
   Tags: patch
   X-Debbugs-Cc: debian-cross@lists.debian.org
   User: debian-cross@lists.debian.org
   Usertags: ftcbfs
   
If not, then I can file the bug for you.
   
-- 
bye,
pabs

https://wiki.debian.org/PaulWise

[toc] | [prev] | [next] | [standalone]


#236175

FromJonathan Tremesaygues <jonathan.tremesaygues@sereema.com>
Date2021-06-17 08:50 +0200
Message-ID<CqU0F-4Ic-1@gated-at.bofh.it>
In reply to#236173
On 17/06/2021 06:15, Paul Wise wrote:
> 
> tomas wrote:
>> On Wed, Jun 16, 2021 at 06:07:00PM +0200, Jonathan Tremesaygues wrote:
>>> But it is not the job of ’dpkg-buildpackage -a<arch>’ to set the
>>> right compiler and other stuff? Neither the wiki, the manpage nor
>>> the unofficial guides found on Internet say I have to set manually
>>> the compiler :-/
>>
>> It should, I think.
> 
> Looks like the cross build QA service sees the same failure:
> 
>     http://crossqa.debian.net/src/ppp
> 
> I think that this means the package doesn't support being cross built
> yet due to problems in the packaging.
> 
> I noticed that if I replace this line in debian/rules:
> 
>     ./configure --prefix=/usr
> 
> With this line:
> 
>     ./configure --prefix=/usr --cc=gcc --cross_compile="$(DEB_HOST_GNU_TYPE)-"
> 
> Then the cross build starts working.
> 
> Would you like to file a bug report about this issue?
> 
> If so, run this command:
> 
>     reportbug --source ppp
> 
> Make sure to use these headers and pseudo-headers:
> 
>     Subject: ppp: FTCBFS -- uses the build architecture compiler
>     
>     Source: ppp
>     Version: 2.4.9-1+1
>     Severity: normal
>     Tags: patch
>     X-Debbugs-Cc: debian-cross@lists.debian.org
>     User: debian-cross@lists.debian.org
>     Usertags: ftcbfs
>     
> If not, then I can file the bug for you.
>     
> 

Thanks on your feedback!

If you don’t mind, I would prefer that you take care of the bug report.


Best regards,
Jo

[toc] | [prev] | [next] | [standalone]


#236187

FromPaul Wise <pabs@debian.org>
Date2021-06-18 02:20 +0200
Message-ID<CraoN-6gv-1@gated-at.bofh.it>
In reply to#236175

[Multipart message — attachments visible in raw view] — view raw

Jonathan Tremesaygues wrote:

> If you don’t mind, I would prefer that you take care of the bug
> report.

Will do.

-- 
bye,
pabs

https://wiki.debian.org/PaulWise

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web