Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 915157 - dev-libs/openssl-3.1.3 build fails due to not locating header files
Summary: dev-libs/openssl-3.1.3 build fails due to not locating header files
Status: UNCONFIRMED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: AMD64 OS X
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-04 02:22 UTC by ash
Modified: 2023-10-04 14:24 UTC (History)
0 users

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


Attachments
Complete build log (build.log,37.93 KB, text/plain)
2023-10-04 02:22 UTC, ash
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ash 2023-10-04 02:22:20 UTC
Created attachment 872121 [details]
Complete build log

When I try to emerge openssl-3.1.3, I get the following error during the compile phase:

In file included from /Users/ash/Gentoo/usr/lib/gcc/x86_64-apple-darwin22/12.2.0/include-fixed/syslimits.h:7,
                 from /Users/ash/Gentoo/usr/lib/gcc/x86_64-apple-darwin22/12.2.0/include-fixed/limits.h:34,
                 from ../openssl-3.1.3/include/internal/e_os.h:13,
                 from ../openssl-3.1.3/apps/include/apps.h:13,
                 from ../openssl-3.1.3/apps/lib/app_params.c:10:
/Users/ash/Gentoo/usr/lib/gcc/x86_64-apple-darwin22/12.2.0/include-fixed/limits.h:203:15: fatal error: limits.h: No such file or directory
  203 | #include_next <limits.h>                /* recurse down to the real one */
      |               ^~~~~~~~~~
compilation terminated.

[...]
../openssl-3.1.3/apps/lib/app_x509.c:10:10: fatal error: string.h: No such file or directory
   10 | #include <string.h>
      |          ^~~~~~~~~~
compilation terminated.
x86_64-apple-darwin22-gcc  -I. -Iinclude -Iproviders/common/include -Iproviders/implementations/include -I../openssl-3.1.3 -I../openssl-3.1.3/include -I../openssl-3.1.3/providers/common/include -I../openssl-3.1.3/providers/implementations/include  -DAES_ASM -DBSAES_ASM -DCMLL_ASM -DECP_NISTZ256_ASM -DGHASH_ASM -DKECCAK1600_ASM -DMD5_ASM -DOPENSSL_BN_ASM_GF2m -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DPOLY1305_ASM -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DX25519_ASM -fPIC -arch x86_64 -march=native -march=skylake-avx512 -mmacosx-version-min=13 -O2 -pipe -fno-strict-aliasing -DL_ENDIAN -DOPENSSL_PIC -DOPENSSLDIR="\"/Users/ash/Gentoo/etc/ssl\"" -DENGINESDIR="\"/Users/ash/Gentoo/usr/lib/engines-3\"" -DMODULESDIR="\"/Users/ash/Gentoo/usr/lib/ossl-modules\"" -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG   -c -o crypto/aes/libcrypto-lib-aes_ofb.o ../openssl-3.1.3/crypto/aes/aes_ofb.c
../openssl-3.1.3/apps/lib/apps_ui.c:10:10: fatal error: string.h: No such file or directory
   10 | #include <string.h>
      |          ^~~~~~~~~~
compilation terminated.
In file included from ../openssl-3.1.3/include/openssl/bn.h:20,
                 from ../openssl-3.1.3/include/openssl/engine.h:24,
                 from ../openssl-3.1.3/apps/lib/apps.c:21:
../openssl-3.1.3/include/openssl/e_os2.h:234:12: fatal error: inttypes.h: No such file or directory
  234 | #  include <inttypes.h>
      |            ^~~~~~~~~~~~
compilation terminated.

[...]
../openssl-3.1.3/apps/lib/engine.c:17:10: fatal error: string.h: No such file or directory
   17 | #include <string.h> /* strcmp */
      |          ^~~~~~~~~~
compilation terminated.
In file included from /Users/ash/Gentoo/usr/lib/gcc/x86_64-apple-darwin22/12.2.0/include-fixed/syslimits.h:7,
                 from /Users/ash/Gentoo/usr/lib/gcc/x86_64-apple-darwin22/12.2.0/include-fixed/limits.h:34,
                 from ../openssl-3.1.3/include/internal/e_os.h:13,
                 from ../openssl-3.1.3/apps/include/apps.h:13,
                 from ../openssl-3.1.3/apps/lib/engine_loader.c:17:
/Users/ash/Gentoo/usr/lib/gcc/x86_64-apple-darwin22/12.2.0/include-fixed/limits.h:203:15: fatal error: limits.h: No such file or directory
  203 | #include_next <limits.h>                /* recurse down to the real one */
      |               ^~~~~~~~~~
compilation terminated.

[...]
In file included from ../openssl-3.1.3/apps/lib/opt.c:13:
../openssl-3.1.3/apps/include/opt.h:12:10: fatal error: sys/types.h: No such file or directory
   12 | #include <sys/types.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:1720: apps/lib/libapps-lib-apps_ui.o] Error 1
make[1]: *** [Makefile:1712: apps/lib/libapps-lib-app_provider.o] Error 1
make[1]: *** [Makefile:1718: apps/lib/libapps-lib-apps.o] Error 1
In file included from ../openssl-3.1.3/include/openssl/bn.h:20,
                 from ../openssl-3.1.3/apps/lib/tlssrp_depr.c:19:
../openssl-3.1.3/include/openssl/e_os2.h:234:12: fatal error: inttypes.h: No such file or directory
  234 | #  include <inttypes.h>
      |            ^~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:1726: apps/lib/libapps-lib-engine_loader.o] Error 1
make[1]: *** [Makefile:1730: apps/lib/libapps-lib-http_server.o] Error 1
In file included from ../openssl-3.1.3/apps/lib/s_socket.c:11:
/Users/ash/Gentoo/usr/lib/gcc/x86_64-apple-darwin22/12.2.0/include-fixed/stdio.h:78:10: fatal error: _stdio.h: No such file or directory
   78 | #include <_stdio.h>
      |          ^~~~~~~~~~
compilation terminated.
../openssl-3.1.3/crypto/aes/aes_ecb.c:10:10: fatal error: assert.h: No such file or directory
   10 | #include <assert.h>
      |          ^~~~~~~~~~
compilation terminated.
In file included from ../openssl-3.1.3/crypto/aes/aes_ige.c:16:
../openssl-3.1.3/include/internal/cryptlib.h:14:11: fatal error: stdlib.h: No such file or directory
   14 | # include <stdlib.h>
      |           ^~~~~~~~~~
compilation terminated.
In file included from ../openssl-3.1.3/apps/lib/s_cb.c:14:
/Users/ash/Gentoo/usr/lib/gcc/x86_64-apple-darwin22/12.2.0/include-fixed/stdio.h:78:10: fatal error: _stdio.h: No such file or directory
   78 | #include <_stdio.h>
      |          ^~~~~~~~~~
compilation terminated.
In file included from ../openssl-3.1.3/crypto/aes/aes_wrap.c:16:
../openssl-3.1.3/include/internal/cryptlib.h:14:11: fatal error: stdlib.h: No such file or directory
   14 | # include <stdlib.h>
      |           ^~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:1724: apps/lib/libapps-lib-engine.o] Error 1

[...]
compilation terminated.
make[1]: *** [Makefile:1734: apps/lib/libapps-lib-opt.o] Error 1
make[1]: *** [Makefile:1736: apps/lib/libapps-lib-s_cb.o] Error 1
make[1]: *** [Makefile:1738: apps/lib/libapps-lib-s_socket.o] Error 1
make[1]: *** [Makefile:1740: apps/lib/libapps-lib-tlssrp_depr.o] Error 1
make[1]: *** [Makefile:4302: crypto/aes/libcrypto-lib-aes_cfb.o] Error 1
make[1]: *** [Makefile:4304: crypto/aes/libcrypto-lib-aes_ecb.o] Error 1
make[1]: *** [Makefile:4306: crypto/aes/libcrypto-lib-aes_ige.o] Error 1
make[1]: *** [Makefile:4308: crypto/aes/libcrypto-lib-aes_misc.o] Error 1
make[1]: *** [Makefile:4310: crypto/aes/libcrypto-lib-aes_ofb.o] Error 1
make[1]: *** [Makefile:4312: crypto/aes/libcrypto-lib-aes_wrap.o] Error 1
make[1]: Leaving directory '/Users/ash/Gentoo/var/tmp/portage/dev-libs/openssl-3.1.3/work/openssl-3.1.3-abi_x86_64.amd64'
make: *** [Makefile:722: build_sw] Error 2

$ emerge --info '=dev-libs/openssl-3.1.3::gentoo_prefix'
Portage 3.0.49 (python 3.11.3-final-0, prefix/darwin/macos/13.0/x64/gcc, gcc-12.2.0, unavailable, 22.6.0 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: macOS-13.6-x86_64-i386-64bit
Timestamp of repository gentoo_prefix: Tue, 03 Oct 2023 23:26:28 +0000
Head commit of repository gentoo_prefix: 6cded3b440a889fbea35205c5c42ab70373b4ff6
sh bash 5.2_p15-r6
ld xtools-2.2.4 ld (Gentoo binutils-apple-8.2.1-r103)
app-misc/pax-utils:        1.3.7::gentoo_prefix
app-shells/bash:           5.2_p15-r6::gentoo_prefix
dev-lang/perl:             5.38.0-r1::gentoo_prefix
dev-lang/python:           3.11.3::gentoo_prefix
dev-util/cmake:            3.27.4-r1::gentoo_prefix
dev-util/meson:            1.2.1-r1::gentoo_prefix
sys-apps/baselayout:       2.14::gentoo_prefix
sys-devel/autoconf:        2.71-r7::gentoo_prefix
sys-devel/automake:        1.16.5-r1::gentoo_prefix
sys-devel/binutils-config: 5.1-r5::gentoo_prefix
sys-devel/gcc:             12.2.0-r2::gentoo_prefix
sys-devel/gcc-config:      2.7-r1::gentoo_prefix
sys-devel/libtool:         2.4.7-r1::gentoo_prefix
sys-devel/make:            4.4.1-r1::gentoo_prefix
Repositories:

gentoo_prefix
    location: /Users/ash/Gentoo/var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix
    priority: -1000
    aliases: gentoo
    volatile: True
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: no
    sync-rsync-verify-jobs: 1

ACCEPT_KEYWORDS="~x64-macos"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-apple-darwin22"
CFLAGS="-march=native -march=skylake-avx512 -mmacosx-version-min=13 -O2 -pipe"
CHOST="x86_64-apple-darwin22"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release"
CONFIG_SHELL="/Users/ash/Gentoo/bin/bash"
CXXFLAGS="-march=native -march=skylake-avx512 -mmacosx-version-min=13 -O2 -pipe"
DISTDIR="/Users/ash/Gentoo/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS=""
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live case-insensitive-fs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news nostrip parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sfperms strict unknown-features-warn unmerge-logs unmerge-orphans unprivileged"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distfiles.prefix.bitzolder.nl/prefix"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-dead_strip_dylibs"
LEX="flex"
MAKEOPTS="--jobs 28 --load-average 29"
PKGDIR="/Users/ash/Gentoo/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/Users/ash/Gentoo/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/Users/ash/Gentoo/var/tmp"
SHELL="/bin/zsh"
USE="aqua bzip2 coreaudio gdbm ipv6 ncurses nls nptl objc objc++ prefix prefix-guest readline ssl test-rust unicode x64-macos zlib" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="Darwin" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="Darwin" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Fabian Groffen gentoo-dev 2023-10-04 06:45:04 UTC
you may want to try using the 13 SDK if your 14 is active.

replace EPREFIX/MacOSX.sdk with a symlink to /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk
Comment 2 ash 2023-10-04 14:24:02 UTC
(In reply to Fabian Groffen from comment #1)
> you may want to try using the 13 SDK if your 14 is active.
> 
> replace EPREFIX/MacOSX.sdk with a symlink to
> /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk

Replaced with a link to /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk, since the link was pointing somewhere in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ already, and it built successfully. Not sure why it breaks in the first place, but it works.