Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.1.1 fails to build with MUSL libc due to missing linux/mman.h #7207

Closed
sfackler opened this issue Sep 12, 2018 · 19 comments
Closed

1.1.1 fails to build with MUSL libc due to missing linux/mman.h #7207

sfackler opened this issue Sep 12, 2018 · 19 comments
Labels
branch: master Merge to master branch help wanted triaged: feature The issue/pr requests/adds a feature
Milestone

Comments

@sfackler
Copy link
Contributor

sfackler commented Sep 12, 2018

Building OpenSSL 1.1.1 against MUSL libc fails to find the linux/mman.h header:

$ curl -L https://www.openssl.org/source/openssl-1.1.1.tar.gz | tar --strip-components=1 -xzf -
$ export CC=musl-gcc
$ ./Configure --prefix=$OPENSSL_DIR linux-x86_64 no-shared no-async no-engine
$ make
[...]
musl-gcc  -I. -Icrypto/include -Iinclude -fPIC -pthread -m64 -Wa,--noexecstack -Wall -O3 -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPADLOCK_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/openssl/ssl\"" -DENGINESDIR="\"/openssl/lib/engines-1.1\"" -DNDEBUG  -MMD -MF crypto/mem_sec.d.tmp -MT crypto/mem_sec.o -c -o crypto/mem_sec.o crypto/mem_sec.c
crypto/mem_sec.c:37:27: fatal error: linux/mman.h: No such file or directory
 #   include <linux/mman.h>
                           ^
compilation terminated.
CC="musl-gcc" /usr/bin/perl crypto/modes/asm/aesni-gcm-x86_64.pl elf crypto/modes/aesni-gcm-x86_64.s
Makefile:3816: recipe for target 'crypto/mem_sec.o' failed
make[1]: *** [crypto/mem_sec.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/tmp/openssl_build'
Makefile:171: recipe for target 'all' failed
make: *** [all] Error 2

The same build setup does work with 1.1.0. This is using the musl-tools package on Debian Stretch.

@sfackler
Copy link
Contributor Author

The header is being pulled in for MLOCK_ONFAULT. MUSL does define that value, but it's in sys/mman.h rather than linux/mman.h (fun!).

@kroeckx
Copy link
Member

kroeckx commented Sep 12, 2018 via email

@sfackler
Copy link
Contributor Author

Ah, apparently this is due to some weirdness with Debian's musl-tools package: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=764335. It doesn't include /usr/include/linux in the header search path.

MUSL does include wrappers for mlock2 and getrandom in the new 1.1.20 release:
https://git.musl-libc.org/cgit/musl/commit/include/sys/mman.h?id=b64d66d0b04fde0af63c3a292be423736294dca9
https://git.musl-libc.org/cgit/musl/commit/include/sys/random.h?id=e20658209177667e490c661dfd35b976749ef3f7

@mattcaswell
Copy link
Member

These comments in that bug report are quite enlightening:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=764335#17

Notably:

I do not consider this a bug of mus-gcc since it is simply not designed and
intended to compile more sophisticated programs.

and

If you want to compile more complicated programs you should look at the
musl-cross project: https://bitbucket.org/GregorR/musl-cross . After
installation you will end up with a full gcc system including linux headers
and binutils. It may sound strange at first to do cross compile for same
arch you are sitting on, but that's the way to go.

@mattcaswell
Copy link
Member

A workaround for this issue to to change your configure line to this:

$ ./Configure --prefix=$OPENSSL_DIR linux-x86_64 no-shared no-async no-engine -DOPENSSL_NO_SECURE_MEMORY

Using the above the compile succeeds but at the expense of not having the secure memory feature. All the tests pass with the exception of the secmem test. That's probably an OpenSSL bug...i.e. not detecting in the test that we've disabled secure memory. I'm also not sure why OPENSSL_NO_SECURE_MEMORY isn't a proper Configure style "no-secure-memory" option.

Obviously it's not recommended to compile things this way (its clearly better to have the secure memory feature).

@sfackler
Copy link
Contributor Author

Thanks for the workaround! It's obviously not ideal but it'll unblock builds at least for now.

This is a kind of weird issue since it's arguably not OpenSSL's problem, but it's still not great if the workflow to build a statically linked binary with OpenSSL goes from apt-get musl-tools to "build gcc, binutils, and elfutils from source".

@sanmai-NL
Copy link

If your build pipeline for Linux runs under the Arch Linux OS, you can install kernel-headers-musl. This works for me, and is better in that we keep the secure memory feature.

@jagu-sayan
Copy link

On alpine I do an apk add linux-headers

@alextremblay
Copy link

Does anyone know of a workaround to this issue for ubuntu?

I've tried installing linux-headers-generic, but I'm still getting the linux/mman.h: No such file or directory error, and I'm a bit lost here

Any help would be greatly appreciated

@richsalz
Copy link
Contributor

simplest answer is remove sec_mem from the Makefile.

@alextremblay
Copy link

ahhh...

I'm trying to build openssl as a dependency for a rust project in a CI pipeline. Is there really no way to compile it on ubuntu without needing to modify the openssl source?

@richsalz
Copy link
Contributor

Is there really no way to compile it on ubuntu without needing to modify the openssl source?

I didn't say that. I said this is a simple answer. I would quibble with saying "on Ubuntu" since you're using a different C library but shrug. Maybe someone else will have a more useful answer for you.

@alextremblay
Copy link

To be clear, I also tried adding the -DOPENSSL_NO_SECURE_MEMORY flag to my ./Configure step, but it had no effect :(

@richsalz
Copy link
Contributor

That makes no sense, since all the #include statements are wrapped in an ifndef.

@alextremblay
Copy link

apologies, i spoke too soon. The -DOPENSSL_NO_SECURE_MEMORY did indeed fix the "fatal error: linux/mmap.h: No such file or directory" error on ubuntu.

What I'm seeing now is actually a different issue:

musl-gcc -fPIE -pie  -I. -Iinclude -fPIC -pthread -m64 -Wa,--noexecstack -Wall -O3 -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DAESNI_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/musl/ssl\"" -DENGINESDIR="\"/musl/lib/engines-1.1\"" -DNDEBUG -DOPENSSL_NO_SECURE_MEMORY -MMD -MF engines/e_afalg.d.tmp -MT engines/e_afalg.o -c -o engines/e_afalg.o engines/e_afalg.c
engines/e_afalg.c:24:10: fatal error: linux/version.h: No such file or directory
   24 | #include <linux/version.h>
      |          ^~~~~~~~~~~~~~~~~

@alextremblay
Copy link

@richsalz Thank you for your help.

I apologize if my responses seem dismissive. I do appreciate your help, even if your answers are not what i want to hear hahaha

@alextremblay
Copy link

I found a workaround on ubuntu, without needing to disable secure memory!

I added -static -idirafter /usr/include/ -idirafter /usr/include/x86_64-linux-gnu/ to my musl-gcc command.

For reference, here's the complete set of steps I used to build openssl against musl in a github actions ubuntu CI runner:

sudo apt-get update
sudo apt-get install -y musl-dev musl-tools linux-headers-$(uname -r)

sudo ln -s /usr/include/x86_64-linux-gnu/asm /usr/include/x86_64-linux-musl/asm && ln -s /usr/include/asm-generic /usr/include/x86_64-linux-musl/asm-generic && ln -s /usr/include/linux /usr/include/x86_64-linux-musl/linux
sudo mkdir /musl
wget https://github.com/openssl/openssl/archive/OpenSSL_1_1_1f.tar.gz
tar zxf OpenSSL_1_1_1f.tar.gz 
cd openssl-OpenSSL_1_1_1f/
CC="musl-gcc -fPIE -pie -static -idirafter /usr/include/ -idirafter /usr/include/x86_64-linux-gnu/" ./Configure no-shared no-async --prefix=/musl --openssldir=/musl/ssl linux-x86_64
make depend
make -j$(nproc)
sudo make install

this compiled the openssl libraries and makes all the files available in the /musl directory.

To make user of it as a dependency on another build (ie the rust openssl-sys create), i added the following env vars to that build:

PKG_CONFIG_ALLOW_CROSS=1
OPENSSL_STATIC=true
OPENSSL_DIR=/musl

Hope someone else finds this useful

@t8m t8m added branch: master Merge to master branch triaged: feature The issue/pr requests/adds a feature labels Jul 19, 2021
@t8m t8m added this to the Post 3.0.0 milestone Jul 19, 2021
@t8m
Copy link
Member

t8m commented Jul 19, 2021

Special build targets are a new feature so -> Post 3.0.0. And of course PRs (against master branch) are welcome for this.

vszakats added a commit to vszakats/curl-for-win that referenced this issue Sep 5, 2023
`linux-headers` package required to fix openssl builds to avoid:
```
../crypto/mem_sec.c:60:13: fatal error: linux/mman.h: No such file or directory
   60 | #   include <linux/mman.h>
      |             ^~~~~~~~~~~~~~
```

Alternative workarounds:
- disable 'secure-memory' feature with `no-secure-memory` `./Configure` option
- CC="${CC} -static -idirafter /usr/include/ -idirafter /usr/include/$(uname -m)-linux-gnu/"

Ref: https://github dot com/openssl/openssl/issues/7207#issuecomment-880121450
vszakats added a commit to curl/curl-for-win that referenced this issue Sep 6, 2023
`linux-headers` package required to fix openssl builds to avoid:
```
../crypto/mem_sec.c:60:13: fatal error: linux/mman.h: No such file or directory
   60 | #   include <linux/mman.h>
      |             ^~~~~~~~~~~~~~
```

Alternative workarounds:
- disable 'secure-memory' feature with `no-secure-memory` `./Configure` option
- CC="${CC} -static -idirafter /usr/include/ -idirafter /usr/include/$(uname -m)-linux-gnu/"

Ref: https://github dot com/openssl/openssl/issues/7207#issuecomment-880121450
vszakats added a commit to curl/curl-for-win that referenced this issue Sep 6, 2023
`linux-headers` package required to fix openssl builds to avoid:
```
../crypto/mem_sec.c:60:13: fatal error: linux/mman.h: No such file or directory
   60 | #   include <linux/mman.h>
      |             ^~~~~~~~~~~~~~
```

Alternative workarounds:
- disable 'secure-memory' feature with `no-secure-memory` `./Configure` option
- CC="${CC} -static -idirafter /usr/include/ -idirafter /usr/include/$(uname -m)-linux-gnu/"

Ref: https://github dot com/openssl/openssl/issues/7207#issuecomment-880121450
vszakats added a commit to vszakats/curl-for-win that referenced this issue Sep 6, 2023
`linux-headers` package required to fix openssl builds to avoid:
```
../crypto/mem_sec.c:60:13: fatal error: linux/mman.h: No such file or directory
   60 | #   include <linux/mman.h>
      |             ^~~~~~~~~~~~~~
```

Alternative workarounds:
- disable 'secure-memory' feature with `no-secure-memory` `./Configure` option
- CC="${CC} -static -idirafter /usr/include/ -idirafter /usr/include/$(uname -m)-linux-gnu/"

Ref: https://github dot com/openssl/openssl/issues/7207#issuecomment-880121450
vszakats added a commit to vszakats/curl-for-win that referenced this issue Sep 7, 2023
`linux-headers` package required to fix openssl builds to avoid:
```
../crypto/mem_sec.c:60:13: fatal error: linux/mman.h: No such file or directory
   60 | #   include <linux/mman.h>
      |             ^~~~~~~~~~~~~~
```

Alternative workarounds:
- disable 'secure-memory' feature with `no-secure-memory` `./Configure` option
- CC="${CC} -static -idirafter /usr/include/ -idirafter /usr/include/$(uname -m)-linux-gnu/"

Ref: https://github dot com/openssl/openssl/issues/7207#issuecomment-880121450
vszakats added a commit to vszakats/curl-for-win that referenced this issue Sep 7, 2023
`linux-headers` package required to fix openssl builds to avoid:
```
../crypto/mem_sec.c:60:13: fatal error: linux/mman.h: No such file or directory
   60 | #   include <linux/mman.h>
      |             ^~~~~~~~~~~~~~
```

Alternative workarounds:
- disable 'secure-memory' feature with `no-secure-memory` `./Configure` option
- CC="${CC} -static -idirafter /usr/include/ -idirafter /usr/include/$(uname -m)-linux-gnu/"

Ref: https://github dot com/openssl/openssl/issues/7207#issuecomment-880121450
vszakats added a commit to vszakats/curl-for-win that referenced this issue Sep 7, 2023
`linux-headers` package required to fix openssl builds to avoid:
```
../crypto/mem_sec.c:60:13: fatal error: linux/mman.h: No such file or directory
   60 | #   include <linux/mman.h>
      |             ^~~~~~~~~~~~~~
```

Alternative workarounds:
- disable 'secure-memory' feature with `no-secure-memory` `./Configure` option
- CC="${CC} -static -idirafter /usr/include/ -idirafter /usr/include/$(uname -m)-linux-gnu/"

Ref: https://github dot com/openssl/openssl/issues/7207#issuecomment-880121450
vszakats added a commit to vszakats/curl-for-win that referenced this issue Sep 7, 2023
`linux-headers` package required to fix openssl builds to avoid:
```
../crypto/mem_sec.c:60:13: fatal error: linux/mman.h: No such file or directory
   60 | #   include <linux/mman.h>
      |             ^~~~~~~~~~~~~~
```

Alternative workarounds:
- disable 'secure-memory' feature with `no-secure-memory` `./Configure` option
- CC="${CC} -static -idirafter /usr/include/ -idirafter /usr/include/$(uname -m)-linux-gnu/"

Ref: https://github dot com/openssl/openssl/issues/7207#issuecomment-880121450
vszakats added a commit to vszakats/curl-for-win that referenced this issue Sep 20, 2023
`linux-headers` package required to fix openssl builds to avoid:
```
../crypto/mem_sec.c:60:13: fatal error: linux/mman.h: No such file or directory
   60 | #   include <linux/mman.h>
      |             ^~~~~~~~~~~~~~
```

Alternative workarounds:
- disable 'secure-memory' feature with `no-secure-memory` `./Configure` option
- CC="${CC} -static -idirafter /usr/include/ -idirafter /usr/include/$(uname -m)-linux-gnu/"

Ref: https://github dot com/openssl/openssl/issues/7207#issuecomment-880121450
vszakats added a commit to vszakats/curl-for-win that referenced this issue Sep 20, 2023
`linux-headers` package required to fix openssl builds to avoid:
```
../crypto/mem_sec.c:60:13: fatal error: linux/mman.h: No such file or directory
   60 | #   include <linux/mman.h>
      |             ^~~~~~~~~~~~~~
```

Alternative workarounds:
- disable 'secure-memory' feature with `no-secure-memory` `./Configure` option
- CC="${CC} -static -idirafter /usr/include/ -idirafter /usr/include/$(uname -m)-linux-gnu/"

Ref: https://github dot com/openssl/openssl/issues/7207#issuecomment-880121450
vszakats added a commit to vszakats/curl-for-win that referenced this issue Sep 22, 2023
`linux-headers` package required to fix openssl builds to avoid:
```
../crypto/mem_sec.c:60:13: fatal error: linux/mman.h: No such file or directory
   60 | #   include <linux/mman.h>
      |             ^~~~~~~~~~~~~~
```

Alternative workarounds:
- disable 'secure-memory' feature with `no-secure-memory` `./Configure` option
- CC="${CC} -static -idirafter /usr/include/ -idirafter /usr/include/$(uname -m)-linux-gnu/"

Ref: https://github dot com/openssl/openssl/issues/7207#issuecomment-880121450
vszakats added a commit to vszakats/curl-for-win that referenced this issue Sep 22, 2023
`linux-headers` package required to fix openssl builds to avoid:
```
../crypto/mem_sec.c:60:13: fatal error: linux/mman.h: No such file or directory
   60 | #   include <linux/mman.h>
      |             ^~~~~~~~~~~~~~
```

Alternative workarounds:
- disable 'secure-memory' feature with `no-secure-memory` `./Configure` option
- CC="${CC} -static -idirafter /usr/include/ -idirafter /usr/include/$(uname -m)-linux-gnu/"

Ref: https://github dot com/openssl/openssl/issues/7207#issuecomment-880121450
vszakats added a commit to vszakats/curl-for-win that referenced this issue Sep 22, 2023
`linux-headers` package required to fix openssl builds to avoid:
```
../crypto/mem_sec.c:60:13: fatal error: linux/mman.h: No such file or directory
   60 | #   include <linux/mman.h>
      |             ^~~~~~~~~~~~~~
```

Alternative workarounds:
- disable 'secure-memory' feature with `no-secure-memory` `./Configure` option
- CC="${CC} -static -idirafter /usr/include/ -idirafter /usr/include/$(uname -m)-linux-gnu/"

Ref: https://github dot com/openssl/openssl/issues/7207#issuecomment-880121450
vszakats added a commit to vszakats/curl-for-win that referenced this issue Sep 23, 2023
`linux-headers` package required to fix openssl builds to avoid:
```
../crypto/mem_sec.c:60:13: fatal error: linux/mman.h: No such file or directory
   60 | #   include <linux/mman.h>
      |             ^~~~~~~~~~~~~~
```

Alternative workarounds:
- disable 'secure-memory' feature with `no-secure-memory` `./Configure` option
- CC="${CC} -static -idirafter /usr/include/ -idirafter /usr/include/$(uname -m)-linux-gnu/"

Ref: https://github dot com/openssl/openssl/issues/7207#issuecomment-880121450
vszakats added a commit to vszakats/curl-for-win that referenced this issue Sep 23, 2023
`linux-headers` package required to fix openssl builds to avoid:
```
../crypto/mem_sec.c:60:13: fatal error: linux/mman.h: No such file or directory
   60 | #   include <linux/mman.h>
      |             ^~~~~~~~~~~~~~
```

Alternative workarounds:
- disable 'secure-memory' feature with `no-secure-memory` `./Configure` option
- CC="${CC} -static -idirafter /usr/include/ -idirafter /usr/include/$(uname -m)-linux-gnu/"

Ref: https://github dot com/openssl/openssl/issues/7207#issuecomment-880121450
vszakats added a commit to vszakats/curl-for-win that referenced this issue Sep 24, 2023
`linux-headers` package required to fix openssl builds to avoid:
```
../crypto/mem_sec.c:60:13: fatal error: linux/mman.h: No such file or directory
   60 | #   include <linux/mman.h>
      |             ^~~~~~~~~~~~~~
```

Alternative workarounds:
- disable 'secure-memory' feature with `no-secure-memory` `./Configure` option
- CC="${CC} -static -idirafter /usr/include/ -idirafter /usr/include/$(uname -m)-linux-gnu/"

Ref: https://github dot com/openssl/openssl/issues/7207#issuecomment-880121450
vszakats added a commit to vszakats/curl-for-win that referenced this issue Sep 27, 2023
`linux-headers` package required to fix openssl builds to avoid:
```
../crypto/mem_sec.c:60:13: fatal error: linux/mman.h: No such file or directory
   60 | #   include <linux/mman.h>
      |             ^~~~~~~~~~~~~~
```

Alternative workarounds:
- disable 'secure-memory' feature with `no-secure-memory` `./Configure` option
- CC="${CC} -static -idirafter /usr/include/ -idirafter /usr/include/$(uname -m)-linux-gnu/"

Ref: https://github dot com/openssl/openssl/issues/7207#issuecomment-880121450
vszakats added a commit to vszakats/curl-for-win that referenced this issue Sep 28, 2023
`linux-headers` package required to fix openssl builds to avoid:
```
../crypto/mem_sec.c:60:13: fatal error: linux/mman.h: No such file or directory
   60 | #   include <linux/mman.h>
      |             ^~~~~~~~~~~~~~
```

Alternative workarounds:
- disable 'secure-memory' feature with `no-secure-memory` `./Configure` option
- CC="${CC} -static -idirafter /usr/include/ -idirafter /usr/include/$(uname -m)-linux-gnu/"

Ref: https://github dot com/openssl/openssl/issues/7207#issuecomment-880121450
vszakats added a commit to vszakats/curl-for-win that referenced this issue Sep 28, 2023
`linux-headers` package required to fix openssl builds to avoid:
```
../crypto/mem_sec.c:60:13: fatal error: linux/mman.h: No such file or directory
   60 | #   include <linux/mman.h>
      |             ^~~~~~~~~~~~~~
```

Alternative workarounds:
- disable 'secure-memory' feature with `no-secure-memory` `./Configure` option
- CC="${CC} -static -idirafter /usr/include/ -idirafter /usr/include/$(uname -m)-linux-gnu/"

Ref: https://github dot com/openssl/openssl/issues/7207#issuecomment-880121450
vszakats added a commit to vszakats/curl-for-win that referenced this issue Sep 28, 2023
`linux-headers` package required to fix openssl builds to avoid:
```
../crypto/mem_sec.c:60:13: fatal error: linux/mman.h: No such file or directory
   60 | #   include <linux/mman.h>
      |             ^~~~~~~~~~~~~~
```

Alternative workarounds:
- disable 'secure-memory' feature with `no-secure-memory` `./Configure` option
- CC="${CC} -static -idirafter /usr/include/ -idirafter /usr/include/$(uname -m)-linux-gnu/"

Ref: https://github dot com/openssl/openssl/issues/7207#issuecomment-880121450
vszakats added a commit to vszakats/curl-for-win that referenced this issue Oct 2, 2023
`linux-headers` package required to fix openssl builds to avoid:
```
../crypto/mem_sec.c:60:13: fatal error: linux/mman.h: No such file or directory
   60 | #   include <linux/mman.h>
      |             ^~~~~~~~~~~~~~
```

Alternative workarounds:
- disable 'secure-memory' feature with `no-secure-memory` `./Configure` option
- CC="${CC} -static -idirafter /usr/include/ -idirafter /usr/include/$(uname -m)-linux-gnu/"

Ref: https://github dot com/openssl/openssl/issues/7207#issuecomment-880121450
vszakats added a commit to vszakats/curl-for-win that referenced this issue Oct 2, 2023
`linux-headers` package required to fix openssl builds to avoid:
```
../crypto/mem_sec.c:60:13: fatal error: linux/mman.h: No such file or directory
   60 | #   include <linux/mman.h>
      |             ^~~~~~~~~~~~~~
```

Alternative workarounds:
- disable 'secure-memory' feature with `no-secure-memory` `./Configure` option
- CC="${CC} -static -idirafter /usr/include/ -idirafter /usr/include/$(uname -m)-linux-gnu/"

Ref: https://github dot com/openssl/openssl/issues/7207#issuecomment-880121450
vszakats added a commit to vszakats/curl-for-win that referenced this issue Oct 3, 2023
`linux-headers` package required to fix openssl builds to avoid:
```
../crypto/mem_sec.c:60:13: fatal error: linux/mman.h: No such file or directory
   60 | #   include <linux/mman.h>
      |             ^~~~~~~~~~~~~~
```

Alternative workarounds:
- disable 'secure-memory' feature with `no-secure-memory` `./Configure` option
- CC="${CC} -static -idirafter /usr/include/ -idirafter /usr/include/$(uname -m)-linux-gnu/"

Ref: https://github dot com/openssl/openssl/issues/7207#issuecomment-880121450
vszakats added a commit to vszakats/curl-for-win that referenced this issue Oct 5, 2023
`linux-headers` package required to fix openssl builds to avoid:
```
../crypto/mem_sec.c:60:13: fatal error: linux/mman.h: No such file or directory
   60 | #   include <linux/mman.h>
      |             ^~~~~~~~~~~~~~
```

Alternative workarounds:
- disable 'secure-memory' feature with `no-secure-memory` `./Configure` option
- CC="${CC} -static -idirafter /usr/include/ -idirafter /usr/include/$(uname -m)-linux-gnu/"

Ref: https://github dot com/openssl/openssl/issues/7207#issuecomment-880121450
vszakats added a commit to vszakats/curl-for-win that referenced this issue Oct 7, 2023
`linux-headers` package required to fix openssl builds to avoid:
```
../crypto/mem_sec.c:60:13: fatal error: linux/mman.h: No such file or directory
   60 | #   include <linux/mman.h>
      |             ^~~~~~~~~~~~~~
```

Alternative workarounds:
- disable 'secure-memory' feature with `no-secure-memory` `./Configure` option
- CC="${CC} -static -idirafter /usr/include/ -idirafter /usr/include/$(uname -m)-linux-gnu/"

Ref: https://github dot com/openssl/openssl/issues/7207#issuecomment-880121450
vszakats added a commit to vszakats/curl-for-win that referenced this issue Oct 7, 2023
`linux-headers` package required to fix openssl builds to avoid:
```
../crypto/mem_sec.c:60:13: fatal error: linux/mman.h: No such file or directory
   60 | #   include <linux/mman.h>
      |             ^~~~~~~~~~~~~~
```

Alternative workarounds:
- disable 'secure-memory' feature with `no-secure-memory` `./Configure` option
- CC="${CC} -static -idirafter /usr/include/ -idirafter /usr/include/$(uname -m)-linux-gnu/"

Ref: https://github dot com/openssl/openssl/issues/7207#issuecomment-880121450
vszakats added a commit to vszakats/curl-for-win that referenced this issue Oct 7, 2023
`linux-headers` package required to fix openssl builds to avoid:
```
../crypto/mem_sec.c:60:13: fatal error: linux/mman.h: No such file or directory
   60 | #   include <linux/mman.h>
      |             ^~~~~~~~~~~~~~
```

Alternative workarounds:
- disable 'secure-memory' feature with `no-secure-memory` `./Configure` option
- CC="${CC} -static -idirafter /usr/include/ -idirafter /usr/include/$(uname -m)-linux-gnu/"

Ref: https://github dot com/openssl/openssl/issues/7207#issuecomment-880121450
vszakats added a commit to curl/curl-for-win that referenced this issue Oct 8, 2023
`linux-headers` package required to fix openssl builds to avoid:
```
../crypto/mem_sec.c:60:13: fatal error: linux/mman.h: No such file or directory
   60 | #   include <linux/mman.h>
      |             ^~~~~~~~~~~~~~
```

Alternative workarounds:
- disable 'secure-memory' feature with `no-secure-memory` `./Configure` option
- CC="${CC} -static -idirafter /usr/include/ -idirafter /usr/include/$(uname -m)-linux-gnu/"

Ref: openssl/openssl#7207 (comment)
@jamuir
Copy link
Member

jamuir commented Oct 15, 2023

@sfackler : can this issue be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch: master Merge to master branch help wanted triaged: feature The issue/pr requests/adds a feature
Projects
None yet
Development

No branches or pull requests

9 participants