Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 554416 - x11-libs/vte-0.28.2-r208 fails to emerge with musl: pty.c:755:3: error: implicit declaration of function ‘ptsname_r’ [-Werror=implicit-function-declaration]
Summary: x11-libs/vte-0.28.2-r208 fails to emerge with musl: pty.c:755:3: error: impli...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Gentoo musl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: musl-porting
  Show dependency tree
 
Reported: 2015-07-10 06:47 UTC by tt_1
Modified: 2022-04-25 17:41 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log of =x11-libs/vte-0.28.2-r207 (vte-0.28-r207-build.log,47.59 KB, text/plain)
2015-07-10 06:47 UTC, tt_1
Details
emerg.info (emerge.info,4.49 KB, application/x-info)
2015-07-10 06:50 UTC, tt_1
Details
build.log with alpine patch (with-alpine-patch-build.log,75.80 KB, text/plain)
2015-07-10 18:03 UTC, tt_1
Details
Update config.h.in (vte-round.patch,430 bytes, patch)
2015-07-10 18:58 UTC, Felix Janda
Details | Diff
build log of =x11-libs/vte-0.38.3 (vte-0.38.3-build.log,119.93 KB, text/plain)
2015-07-11 07:29 UTC, tt_1
Details
musl.patch (file_554416.txt,696 bytes, text/plain)
2020-09-03 01:29 UTC, tonemgub
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tt_1 2015-07-10 06:47:29 UTC
Created attachment 406452 [details]
build log of =x11-libs/vte-0.28.2-r207

trying to emerge =vte-0.28.2-r207 with musl fails, see attached build.log for more informations. 

xfce4-terminal needs it.
Comment 1 tt_1 2015-07-10 06:50:59 UTC
Created attachment 406454 [details]
emerg.info
Comment 2 Felix Janda 2015-07-10 17:01:25 UTC
The patch

http://git.alpinelinux.org/cgit/aports/tree/main/vte/fix-includes.patch

should fix this. (did not test)

Does not seem to be fixed in upstream, yet. The problem is that musl
exports the GNU extension ptsname_r in <stdlib.h> only if _GNU_SOURCE
is declared. (as says the man page)
Comment 3 tt_1 2015-07-10 18:03:31 UTC
Created attachment 406472 [details]
build.log with alpine patch

not working, unfortunatly.
Comment 4 Felix Janda 2015-07-10 18:58:51 UTC
Created attachment 406478 [details, diff]
Update config.h.in

Thanks for testing!

vte-0.28.2-interix.patch seems to be the new culprit. It should also
update config.h.in. Try applying additionally the attached patch.
Comment 5 tt_1 2015-07-11 07:29:21 UTC
Created attachment 406494 [details]
build log of =x11-libs/vte-0.38.3

the config.h patch fixes =vte-0.28.2-r207 , so xfce4-terminal and lxterminal do compile now. 

gnome-terminal however needs vte:2.91, which is still failing to emerge. I applied the fix-includes.patch , the config.h patch does not apply!
Comment 6 Anthony Basile gentoo-dev 2015-07-12 13:34:34 UTC
(In reply to tt_1 from comment #5)
> Created attachment 406494 [details]
> build log of =x11-libs/vte-0.38.3
> 
> the config.h patch fixes =vte-0.28.2-r207 , so xfce4-terminal and lxterminal
> do compile now. 
> 
> gnome-terminal however needs vte:2.91, which is still failing to emerge. I
> applied the fix-includes.patch , the config.h patch does not apply!

So what versions need to go on the overlay?
Comment 7 Felix Janda 2015-07-12 15:01:39 UTC
Instead of patching config.h.in, autoheader can also be invoked after
patching.

The interix patch does modify configure instead of invoking eautoreconf in
order not to introduce an autoconf dependency? If eautoreconf worked here,
that would also solve the problem.

Anyway there are two issues (so maybe there should be two bugs as well):
- Missing _GNU_SOURCE -> upstream
- Bad vte-0.28.2-interix.patch -> gentoo
Comment 8 tt_1 2015-07-13 19:03:19 UTC
(In reply to Anthony Basile from comment #6)
> (In reply to tt_1 from comment #5)
> > Created attachment 406494 [details]
> > build log of =x11-libs/vte-0.38.3
> > 
> > the config.h patch fixes =vte-0.28.2-r207 , so xfce4-terminal and lxterminal
> > do compile now. 
> > 
> > gnome-terminal however needs vte:2.91, which is still failing to emerge. I
> > applied the fix-includes.patch , the config.h patch does not apply!
> 
> So what versions need to go on the overlay?

=x11-libs/vte-0.28.2-r207 is compiling with the alpine patch and the patch provided by Felix. so right now, it is possible to compile xfce4-terminal and lxterminal, as they are in need of vte:0 - feel free to commit it to the overlay. 

it would be great to have the vte:2.91 ebuilds working as well, the gnome-terminal needs them. but I cannot do much more than to test patches which are provided here! :)
Comment 9 Felix Janda 2015-07-14 23:23:35 UTC
As far as I see, vte:2.91 does not apply the interix patch anymore. So
it should work without my config.h patch. (This could well be the reason
why it does not apply any more.)
Comment 10 Anthony Basile gentoo-dev 2015-07-18 23:14:05 UTC
(In reply to Felix Janda from comment #9)
> As far as I see, vte:2.91 does not apply the interix patch anymore. So
> it should work without my config.h patch. (This could well be the reason
> why it does not apply any more.)

The fix is in the overlay for 0.28.2.  I'd like to move past the _GNU_SOURCE patch and just add it as a CPPFLAGS using append-cppflags in the gentoo tree.  ptsname_r() is a linux extension so the add the flags is just fine across platforms.

I'll leave this in progress until we get this working in the gentoo tree. I'm not sure if anything needs to go upstream vte since SLOT=2.91 is okay, modulo the CPPFLAGS.
Comment 11 tt_1 2017-06-23 10:36:43 UTC
Any news on this one?
Comment 12 tonemgub 2020-09-03 01:29:52 UTC
Created attachment 657988 [details]
musl.patch

vte-0.60.3 just compiled fine for me borrowing the WEXIT patch from musl overlay.
Comment 13 NeilKaplan 2021-07-03 09:03:35 UTC Comment hidden (spam)
Comment 14 Larry the Git Cow gentoo-dev 2022-04-22 00:46:27 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c44771d1fa957cd2f04b42d79f900205575f0faa

commit c44771d1fa957cd2f04b42d79f900205575f0faa
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-04-22 00:46:05 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-04-22 00:46:05 +0000

    x11-libs/vte: fix musl build
    
    Closes: https://bugs.gentoo.org/835489
    Closes: https://bugs.gentoo.org/554416
    Thanks-to: Jory A. Pratt <anarchy@gentoo.org>
    Signed-off-by: Sam James <sam@gentoo.org>

 .../vte/files/vte-0.66.2-musl-W_EXITCODE.patch     | 29 ++++++++++++++++++++++
 x11-libs/vte/vte-0.66.2.ebuild                     |  2 ++
 x11-libs/vte/vte-0.68.0.ebuild                     |  2 ++
 3 files changed, 33 insertions(+)