Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 713616 - app-text/robodoc-4.99.43 : troff_generator.c: fatal error: sys/unistd.h: No such file or directory
Summary: app-text/robodoc-4.99.43 : troff_generator.c: fatal error: sys/unistd.h: No s...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ovidiu - Dan Bogat
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2020-03-20 14:51 UTC by Toralf Förster
Modified: 2020-03-25 13:45 UTC (History)
2 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,16.52 KB, text/plain)
2020-03-20 14:51 UTC, Toralf Förster
Details
app-text:robodoc-4.99.43:20200320-023853.log (app-text:robodoc-4.99.43:20200320-023853.log,7.69 KB, text/plain)
2020-03-20 14:51 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,177.12 KB, text/plain)
2020-03-20 14:51 UTC, Toralf Förster
Details
environment (environment,20.15 KB, text/plain)
2020-03-20 14:51 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,17.71 KB, application/x-bzip)
2020-03-20 14:51 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,6.04 KB, application/x-bzip)
2020-03-20 14:51 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,8.14 KB, application/x-bzip)
2020-03-20 14:51 UTC, Toralf Förster
Details
patch to build against musl (robodoc-4.99.43_clean_libc.patch,388 bytes, patch)
2020-03-21 15:11 UTC, Ovidiu - Dan Bogat
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2020-03-20 14:51:00 UTC
x86_64-gentoo-linux-musl-gcc -DHAVE_CONFIG_H -I.     -O2 -pipe -march=native -fno-common -falign-functions=32:25:16 -c -o ascii_generator.o ascii_generator.c
x86_64-gentoo-linux-musl-gcc -DHAVE_CONFIG_H -I.     -O2 -pipe -march=native -fno-common -falign-functions=32:25:16 -c -o troff_generator.o troff_generator.c
troff_generator.c:33:10: fatal error: sys/unistd.h: No such file or directory
   33 | #include <sys/unistd.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0_musl-20200316-165821

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-gentoo-linux-musl-9.3.0 *
clang version 10.0.0 
Target: x86_64-gentoo-linux-musl
Thread model: posix
InstalledDir: /usr/lib/llvm/10/bin
/usr/lib/llvm/10
10.0.0
Available Python interpreters, in order of preference:
  [1]   python3.8
  [2]   python3.7
  [3]   python3.6
  [4]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems) *
Available Rust versions:
  [1]   rust-1.41.1 *

repository:
==> /var/db/repos/gentoo/metadata/timestamp.chk <==
Wed, 18 Mar 2020 13:38:27 +0000
emerge -qpvO app-text/robodoc
[ebuild  N    ] app-text/robodoc-4.99.43  USE="-examples"
Comment 1 Toralf Förster gentoo-dev 2020-03-20 14:51:03 UTC
Created attachment 623072 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-03-20 14:51:07 UTC
Created attachment 623074 [details]
app-text:robodoc-4.99.43:20200320-023853.log
Comment 3 Toralf Förster gentoo-dev 2020-03-20 14:51:10 UTC
Created attachment 623076 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2020-03-20 14:51:13 UTC
Created attachment 623078 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2020-03-20 14:51:16 UTC
Created attachment 623080 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2020-03-20 14:51:19 UTC
Created attachment 623082 [details]
logs.tbz2
Comment 7 Toralf Förster gentoo-dev 2020-03-20 14:51:22 UTC
Created attachment 623084 [details]
temp.tbz2
Comment 8 Ovidiu - Dan Bogat 2020-03-20 21:58:16 UTC
Hy. 

This is due to musl and should be patched upstream. 
The placement of unistd.h differs as follows:

with musl: /usr/include/unistd.h
with gnu:  /usr/include/unistd.h
           /usr/include/sys/unistd.h (includes previous)

This is a rather quick fix upstream and this particular header gets included in troff_generator.c only. I'd rather build the source against musl completely to find any other errors related to libc and patch them all in one go (another one used which
Comment 9 Ovidiu - Dan Bogat 2020-03-21 15:11:55 UTC
Created attachment 623864 [details, diff]
patch to build against musl

the sources build fine against musl on a amd64-musl-hardened and robodoc works just fine
Comment 10 Larry the Git Cow gentoo-dev 2020-03-25 13:45:39 UTC
The bug has been closed via the following commit(s):

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

commit f8448ce2f5cf828cdf63df45f52eb643cb9a937c
Author:     Ovidiu-Dan Bogat <4z0r@ovidiu.at>
AuthorDate: 2020-03-21 15:07:51 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2020-03-25 13:45:24 +0000

    app-text/robodoc: revision to build against musl
    
    Closes: https://bugs.gentoo.org/713616
    Signed-off-by: Ovidiu-Dan Bogat <ovi@ovidiu.at>
    Package-Manager: Portage-2.3.89, Repoman-2.3.20
    Closes: https://github.com/gentoo/gentoo/pull/15035
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 .../robodoc/files/robodoc-4.99.43_clean_libc.patch | 13 +++++++++
 app-text/robodoc/robodoc-4.99.43-r1.ebuild         | 32 ++++++++++++++++++++++
 2 files changed, 45 insertions(+)