Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[musl] Patching header files
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
gengreen
Tux's lil' helper
Tux's lil' helper


Joined: 23 Dec 2017
Posts: 84

PostPosted: Fri Jan 05, 2018 7:51 am    Post subject: [musl] Patching header files Reply with quote

Hello,

I'm currently installing a new stage3 with the profile musl.

As I understand, ebuild will more or less often fail to build if the header is not patched for musl

Example :

Code:
emerge sys-apps/net-tools

....

In file included from /usr/include/linux/if_tunnel.h:5:0,
                 from iptunnel.c:38:
/usr/include/linux/if.h:232:8: error: redefinition of ‘struct ifreq’
 struct ifreq {
        ^~~~~
In file included from iptunnel.c:30:0:
/usr/include/net/if.h:76:8: note: originally defined here
 struct ifreq {
        ^~~~~
In file included from /usr/include/linux/if_tunnel.h:5:0,
                 from iptunnel.c:38:
/usr/include/linux/if.h:284:8: error: redefinition of ‘struct ifconf’
 struct ifconf  {
        ^~~~~~
In file included from iptunnel.c:30:0:
/usr/include/net/if.h:116:8: note: originally defined here
 struct ifconf {
        ^~~~~~
make: *** [Makefile:106: iptunnel.o] Error 1
......


Original if.h

https://paste.pound-python.org/show/ObVpCemKU6dK8oHkkcVi/

I'm not c++ dev but I patched the header to make sys-apps/net-tools emerge with musl

Patched if.h

https://paste.pound-python.org/show/xdpY5IwlLPtn8QB0T4hN/

Question

It is the right way to patch a header file ? If no what is the "standard method" to do it ?
Is thoses header patched have any interest for the layman overlay musl ? (if yes I could send what was need to be patch in my system)
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 21671
Location: here

PostPosted: Fri Jan 05, 2018 8:03 am    Post subject: Reply with quote

I don't know much musl profile, but you added musl overlay?
I see, that in recent changes, there is one for headers for sys-apps/net-tools package
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
gengreen
Tux's lil' helper
Tux's lil' helper


Joined: 23 Dec 2017
Posts: 84

PostPosted: Fri Jan 05, 2018 8:19 am    Post subject: Reply with quote

fedeliallalinea wrote:
I don't know much musl profile, but you added musl overlay?
I see, that in recent changes, there is one for headers for sys-apps/net-tools package


Yes I had, sync layman and emerge. I made this patch a hours ago

Code:
sys-apps/net-tools
Available versions:  1.60_p20160215155418 1.60_p20161110235919 1.60_p20161110235919[1] (**)9999


None of those version have a proper patch
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 21671
Location: here

PostPosted: Fri Jan 05, 2018 8:54 am    Post subject: Reply with quote

You are sure that you try to install net-tools from musl overlay (emerge sys-apps/net-tools::musl)?
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
gengreen
Tux's lil' helper
Tux's lil' helper


Joined: 23 Dec 2017
Posts: 84

PostPosted: Fri Jan 05, 2018 9:00 am    Post subject: Reply with quote

fedeliallalinea wrote:
You are sure that you try to install net-tools from musl overlay (emerge sys-apps/net-tools::musl)?


Correction, see the edit
Ha you right, the problem is that the overlay have the exact same version of the portage

portage 1.60_p20161110235919
overlay 1.60_p20161110235919[1]

I had
Code:
=sys-apps/net-tools-p20161110235919 ~amd64
in my packages.keywords/sys-apps but emerge always pickup the portage version instead of the overlay...

The patch I made is good for the git version sys-apps/net-tools-9999 (so useless basically)

How could I force emerge to pickup the overlay in case of similar version ?
End Correction, see the edit

Edit :

The problem is not the overlay, is the last stage3-amd64-musl-hardened-20171204.tar.bz2 (which include the header linux/if.h not patched)
The overlay can be emerge but it won't fix the header.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum