mbox series

[v2,0/2] glibc: Fix conflict error when enbale multilib on aarch64.

Message ID 20240315030531.1179974-1-leimaohui@fujitsu.com
Headers show
Series glibc: Fix conflict error when enbale multilib on aarch64. | expand

Message

Maohui Lei (Fujitsu) March 15, 2024, 3:05 a.m. UTC
From: Lei Maohui <leimaohui@fujitsu.com>

- Fix conflict of finclude/math-vector-fortran.h error when enable multilib on
  aarch64.
- Because multilib header doesn't work well for fortran compiler, a compile
  error will occur with above glibc patch. So, disable multilib_header when
  fortran is enabled.

Lei Maohui (2):
  multilib_header.bbclass:Disable multilib_header when fortran is
    enabled.
  glibc: Fix conflict error when enbale multilib on aarch64.

 meta/classes-recipe/multilib_header.bbclass | 6 ++++++
 meta/recipes-core/glibc/glibc-package.inc   | 1 +
 2 files changed, 7 insertions(+)

Comments

Richard Purdie March 15, 2024, 7:35 a.m. UTC | #1
On Fri, 2024-03-15 at 11:05 +0800, leimaohui via lists.openembedded.org
wrote:
> From: Lei Maohui <leimaohui@fujitsu.com>
> 
> - Fix conflict of finclude/math-vector-fortran.h error when enable
> multilib on
>   aarch64.
> - Because multilib header doesn't work well for fortran compiler, a
> compile
>   error will occur with above glibc patch. So, disable
> multilib_header when
>   fortran is enabled.
> 
> Lei Maohui (2):
>   multilib_header.bbclass:Disable multilib_header when fortran is
>     enabled.
>   glibc: Fix conflict error when enbale multilib on aarch64.

I'm afraid this looks like a pretty horrible workaround where the
header is broken in the non-fortran enabled case and mulitlib wouldn't
work in the fortran case.

I don't really want to merge a patch like this.

Cheers,

Richard
Maohui Lei (Fujitsu) March 18, 2024, 1:24 a.m. UTC | #2
Hi, Richard

> I'm afraid this looks like a pretty horrible workaround where the header is
> broken in the non-fortran enabled case and mulitlib wouldn't work in the fortran
> case.
>

I'm sorry. It seems that I should submit a discussion instead of submitting these patches directly.

I found that the current oe_multilib_header() function doesn’t work for fortran at all. 
I figured out two methods to fix this error: 
 1. Write a new example multilib herder example for fortran, such as multilib_header_fortran_wrapper.h or something else.
 2. Disable finclude/math-vector-fortran.h for fortran. 

And finally, I selected the second way for the following considerations:
 - I searched the bug report about multilib and fortran, it seems that few user to enable the multilib for fortran compiler.  
 - I built the core-image-minimal with multilib for fortran compiler. There is only one build error(finclude/math-vector-fortran.h). 

For the above-mentioned considerations, I selected the second way to fix the issue quickly. 
I wonder if you can give me some suggestions about how to fix this issue.

Best regards
Lei


> -----Original Message-----
> From: openembedded-core@lists.openembedded.org
> <openembedded-core@lists.openembedded.org> On Behalf Of Richard Purdie
> Sent: Friday, March 15, 2024 3:36 PM
> To: Lei, Maohui <leimaohui@fujitsu.com>;
> openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH v2 0/2] glibc: Fix conflict error when enbale
> multilib on aarch64.
> 
> On Fri, 2024-03-15 at 11:05 +0800, leimaohui via lists.openembedded.org
> wrote:
> > From: Lei Maohui <leimaohui@fujitsu.com>
> >
> > - Fix conflict of finclude/math-vector-fortran.h error when enable
> > multilib on
> >   aarch64.
> > - Because multilib header doesn't work well for fortran compiler, a
> > compile
> >   error will occur with above glibc patch. So, disable multilib_header
> > when
> >   fortran is enabled.
> >
> > Lei Maohui (2):
> >   multilib_header.bbclass:Disable multilib_header when fortran is
> >     enabled.
> >   glibc: Fix conflict error when enbale multilib on aarch64.
> 
> I'm afraid this looks like a pretty horrible workaround where the header is
> broken in the non-fortran enabled case and mulitlib wouldn't work in the fortran
> case.
> 
> I don't really want to merge a patch like this.
> 
> Cheers,
> 
> Richard
>