Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Crash extern void encrypt (char *__block, int __edflag) __THROW __nonnull ((1)); #61

Open
VineFiner opened this issue Jun 18, 2022 · 6 comments

Comments

@VineFiner
Copy link

Docker 5.6.2-centos7

 > [builder  7/11] RUN swift build -c release --static-swift-stdlib:                                                         
#13 1.577 Building for production...                                                                                         
#13 1.738 In file included from /build/.build/checkouts/swift-backtrace/Sources/CBacktrace/elf.c:41:                         
#13 1.738 /usr/include/unistd.h:1147:35: error: __block attribute not allowed, only allowed on local variables               
#13 1.738 extern void encrypt (char *__block, int __edflag) __THROW __nonnull ((1));
#13 1.738                                   ^
#13 1.766 remark: Incremental compilation has been disabled: it is not compatible with whole module optimization1 error generated.
#13 1.808 [0/875] Compiling CBacktrace elf.c
#13 1.809 [1/875] Compiling _NumericsShims _NumericsShims.c
#13 1.812 [1/875] Compiling CBacktrace dwarf.c
#13 1.812 [2/875] Compiling printf.c
#13 1.813 [3/875] Compiling CBacktrace backtrace.c
#13 1.813 [3/875] Compiling socket.c
------
executor failed running [/bin/sh -c swift build -c release --static-swift-stdlib]: exit code: 1
@VineFiner
Copy link
Author

@tomerd
Copy link
Collaborator

tomerd commented Jun 22, 2022

hi @VineFiner was this fixed? if so, how?

@VineFiner
Copy link
Author

No fixed。
you can test

docker run --rm \
-v "$PWD:/workspace" \
-w /workspace \
swift:5.6.2-centos7  \
/bin/bash -cl " \
          yum update -y \
          && yum remove git -y \
          && yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm \
          && yum install git -y \
          && swift package resolve \
          && swift build -c release --static-swift-stdlib"

error:

Building for production...
[1/13] Compiling CBacktrace state.c
[2/13] Compiling CBacktrace simple.c
[3/13] Compiling CBacktrace sort.c
In file included from /workspace/Sources/CBacktrace/posix.c:40:
/usr/include/unistd.h:1147:35: error: __block attribute not allowed, only allowed on local variables
extern void encrypt (char *__block, int __edflag) __THROW __nonnull ((1));
                                  ^
[4/13] Compiling CBacktrace print.c

@VineFiner
Copy link
Author

hi @VineFiner was this fixed? if so, how?
centos7 image
sed -i -e 's/\*__block/\*__libc_block/g' /usr/include/unistd.h invalid

@VineFiner
Copy link
Author

@VineFiner VineFiner reopened this Jun 23, 2022
@tomerd
Copy link
Collaborator

tomerd commented Jun 23, 2022

hi @VineFiner not clear to me if this is resolved or not. sounded like the centos 7 image used did not have the block swizelling mentioned above applied, tho it should be part of the official swift centos 7 image so its surprising to me that one would need to do that on their own

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

No branches or pull requests

2 participants