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
[SR-13082] llvm-project: dd_interceptors.cpp:225:20: error: redefinition of 'realpath' #55528
Comments
Comment by solo turn (JIRA) retested with e80a6b0 llvm-project, now fixed. |
Comment by solo turn (JIRA) hi theindigamer (JIRA User) i picked up the arch linux packages recently from git, as well as from release. both do not compile. the intention is to first focus on the git version, then it will trickle down to a working release over time. for this purpose i created now a daily build on github as i did not know how to integrate one in your jenkins. i am not sure how to proceed with this error. the error is always: the build is here: the arch packages: doing a build with |
soloturn (JIRA User), one possibility is that |
Comment by solo turn (JIRA) theindigamer (JIRA User) tried so, https://github.com/soloturn/swift-aur/runs/852851416?check_suite_focus=true#step:3:324 ```
but for the configure step of compiler-rt it does not do it or has no effect: the patch applied is here: will try to create an image which lacks the header file. |
Comment by solo turn (JIRA) thanks theindigamer (JIRA User), i deleted bits/stdlib.h and references which helped: soloturn/build-aur-action@48ca1a3 /usr/include/stdlib.h has:
deleting the if, and the header file can be done on this docker image, but on normal operations this will not be sustainable. arch linux has a simpler package structure than other distributions, as it does not split between runtime and -dev packages, make the swift compile work for arch should fix it for any linux. how would you recommend to fix the detection / usage of the file in the original swift build? |
Sorry, I forgot to respond here. Ok, so at least we understand what is causing the issue. I'm not sure what exactly is setting the
Also, from what I can tell, this doesn't have something to do with Swift specifically... It seems like an LLVM configuration issue... might be worth asking on the llvm-dev mailing list or filing a bug report against LLVM in case anyone has run into this before. It might be worth checking how the LLVM packages are built for Arch Linux and if they have any special hacks. |
Comment by solo turn (JIRA) arch llvm-10.0.1 package is here: https://www.archlinux.org/packages/extra/x86_64/llvm/ there is no patch to the code coming from the release tarball or git, the build script does: cmake .. -G Ninja \ arch uses "makepkg" which sets in its config the host triple (e.g. x86_64-pc-linux-gnu" to "chost" which is set: chost = run_command(cc, '-dumpmachine').stdout().strip() when packaging, llvm-config.h is provided additionally to distinguish between 32 bit and 64 bit: https://github.com/archlinux/svntogit-packages/blob/packages/llvm/trunk/llvm-config.h #include <bits/wordsize.h> #if __WORDSIZE == 32 |
Comment by solo turn (JIRA) then there is compiler-rt: no patch or hack, it does: cmake .. -G Ninja and the apple build does, according to: /github/workspace/swift-language-git/src/build/buildbot_linux/llvm-linux-x86_64/./bin/clang++ -I/github/workspace/swift-language-git/src/llvm-project/compiler-rt/lib/tsan/dd/../.. -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -Wall -std=c++14 -Wno-unused-parameter -O3 -DNDEBUG -m64 -fno-lto -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -Wno-non-virtual-dtor -fno-rtti -MD -MT lib/tsan/dd/CMakeFiles/clang_rt.dd-x86_64.dir/dd_interceptors.cpp.o -MF lib/tsan/dd/CMakeFiles/clang_rt.dd-x86_64.dir/dd_interceptors.cpp.o.d -o lib/tsan/dd/CMakeFiles/clang_rt.dd-x86_64.dir/dd_interceptors.cpp.o -c /github/workspace/swift-language-git/src/llvm-project/compiler-rt/lib/tsan/dd/dd_interceptors.cpp |
Looking at the address sanitizer code, I do see there's a macro clang/test/Driver/darwin-asan-nofortify.c
1:// Make sure AddressSanitizer disables _FORTIFY_SOURCE on Darwin.
5:// CHECK: #define _FORTIFY_SOURCE 0 I suspect that might be related to the issue you are seeing. I do see a |
Comment by solo turn (JIRA) @natecook1000 you wrote the python build-script. what makes compiling compiler-rt special in the swift case? from the command line i see it is using |
Comment by solo turn (JIRA) natesg (JIRA User), theindigamer (JIRA User), i tried to build the arch linux compiler-rt package now with clang, clang++ instead of g++, and it gives the same error. for you guys llvm is "upstream" isn't it and therefor it needs to be fixed there? i did download the PKGBUILD file from arch: https://github.com/archlinux/svntogit-packages/blob/packages/compiler-rt/trunk/PKGBUILD and then: and it really gives the same error when compiling swift. |
Comment by solo turn (JIRA) this is upstrean in compiler-rt, will report bug there if they permit. |
> i did download the PKGBUILD file from arch > and it really gives the same error when compiling swift Thank you. Yes, that means it should be fixed upstream, not in Swift. |
Comment by solo turn (JIRA) |
Comment by Fan Jiang (JIRA) @compnerd This one is the one I was talking about today 🙂 |
Environment
the build script:
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=swift-language-git
Additional Detail from JIRA
md5: 4d6973609f40b3d15daca4d16d659e9b
Issue Description:
building swift version from git on arch linux gives the following error:
The text was updated successfully, but these errors were encountered: