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

Alpine-musl: Druntime fixes #66

Merged
merged 2 commits into from
Apr 7, 2024
Merged

Conversation

kassane
Copy link
Contributor

@kassane kassane commented Apr 7, 2024

My environment test: https://github.com/kassane/alpine-ldc2-docker

Building opend-ldc:

core/internal/backtrace/handler.d(70): Deprecation: pointer arithmetic not allowed in @safe functions
core/sys/posix/sys/socket.d(201): Deprecation: pointer arithmetic not allowed in @safe functions
core/sys/posix/sys/socket.d(206): Deprecation: pointer arithmetic not allowed in @safe functions
ninja: subcommands failed

and (same error in D upstream [master]):

~/opend/ldc $ ./build/bin/ldmd2 -run ../../hellod-sample.d 
/usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /app/opend/ldc/build/lib/libdruntime-ldc.a(fiber.o): in function `_D4core6thread5fiber5Fiber10allocStackMFNbmmZv':
fiber.d:(.text._D4core6thread5fiber5Fiber10allocStackMFNbmmZv+0x75): undefined reference to `mmap64'
/usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /app/opend/ldc/build/lib/libdruntime-ldc.a(osmemory.o): in function `_D2rt3sys5posix8osmemory10os_mem_mapFNbNimbZPv':
osmemory.d:(.text._D2rt3sys5posix8osmemory10os_mem_mapFNbNimbZPv+0x21): undefined reference to `mmap64'
/usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /app/opend/ldc/build/lib/libdruntime-ldc.a(io.o): in function `_D4core8internal3elf2io__T5ElfIOTSQBg3sysQz10Elf64_EhdrTSQCdQxQBu10Elf64_ShdrVhi2Z7ElfFile4openFNbNiPxaJSQDzQDxQDrQDq__TQDqTQDnTQCuVhi2ZQCcZb':
io.d:(.text._D4core8internal3elf2io__T5ElfIOTSQBg3sysQz10Elf64_EhdrTSQCdQxQBu10Elf64_ShdrVhi2Z7ElfFile4openFNbNiPxaJSQDzQDxQDrQDq__TQDqTQDnTQCuVhi2ZQCcZb+0xa6): undefined reference to `mmap64'
/usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /app/opend/ldc/build/lib/libdruntime-ldc.a(io.o): in function `_D4core8internal3elf2io__T5ElfIOTSQBg3sysQz10Elf64_EhdrTSQCdQxQBu10Elf64_ShdrVhi2Z13NamedSections7opApplyMFNbNiMDFNbNimAxaSQErQEpQEjQEi__TQEiTQEfTQDmVhi2Z16ElfSectionHeaderZiZi':
io.d:(.text._D4core8internal3elf2io__T5ElfIOTSQBg3sysQz10Elf64_EhdrTSQCdQxQBu10Elf64_ShdrVhi2Z13NamedSections7opApplyMFNbNiMDFNbNimAxaSQErQEpQEjQEi__TQEiTQEfTQDmVhi2Z16ElfSectionHeaderZiZi+0xaf): undefined reference to `mmap64'
/usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: io.d:(.text._D4core8internal3elf2io__T5ElfIOTSQBg3sysQz10Elf64_EhdrTSQCdQxQBu10Elf64_ShdrVhi2Z13NamedSections7opApplyMFNbNiMDFNbNimAxaSQErQEpQEjQEi__TQEiTQEfTQDmVhi2Z16ElfSectionHeaderZiZi+0x16a): undefined reference to `mmap64'
/usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /app/opend/ldc/build/lib/libdruntime-ldc.a(io.o):io.d:(.text._D4core8internal3elf2io__T5ElfIOTSQBg3sysQz10Elf64_EhdrTSQCdQxQBu10Elf64_ShdrVhi2Z13NamedSections7opApplyMFNbNiMDFNbNimAxaSQErQEpQEjQEi__TQEiTQEfTQDmVhi2Z16ElfSectionHeaderZiZi+0x2a5): more undefined references to `mmap64' follow
collect2: error: ld returned 1 exit status
Error: /usr/bin/cc failed with status: 1

cc: @adamdruppe

@adamdruppe adamdruppe merged commit 677da14 into opendlang:master Apr 7, 2024
7 checks passed
@adamdruppe
Copy link
Contributor

thx yeah i couldn't test all the builds but they tend to be easy fixes once we find it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants