similar to: ld.lld fails with "undefined symbol: _fopen" on macOS, while working as expected on Linux

Displaying 20 results from an estimated 10000 matches similar to: "ld.lld fails with "undefined symbol: _fopen" on macOS, while working as expected on Linux"

2019 Jun 07
2
ld.lld fails with "undefined symbol: _fopen" on macOS, while working as expected on Linux
Thanks, Tim. You are right, it's using macOS' stdio.h, which is a terrible idea. Clang docs on --sysroot: When you have extracted your cross-compiler from a zip file into a directory, you have to use --sysroot=<path>. The path is the root directory where you have unpacked your file, and Clang will look for the directories bin, lib, include in there. I have a silly question: where
2020 May 14
2
ld.lld ignoring --sysroot
On 2020-05-14, Rui Ueyama via llvm-dev wrote: >On Thu, May 14, 2020 at 11:04 AM Ivan Medoedov via llvm-dev < >llvm-dev at lists.llvm.org> wrote: > >> Hello, >> >> I'm trying to compile a Linux hello world executable on macOS. >> >> The first step is simple: >> >> clang -c -target x86_64-linux-gnu -c -o hello.o hello.c >> >>
2020 May 14
2
ld.lld ignoring --sysroot
Hello, I'm trying to compile a Linux hello world executable on macOS. The first step is simple: clang -c -target x86_64-linux-gnu -c -o hello.o hello.c But linking results in an error: ld.lld --sysroot=/linuxroot/ -o hello -m elf_x86_64 \ -dynamic-linker /lib64/ld-linux-x86-64.so.2 \ /lib/crt1.o \ /usr/lib/x86_64-linux-gnu/crti.o ../hello.o \ /usr/lib/x86_64-linux-gnu/libc.so \
2019 May 03
2
Cross compiling an empty program results in a segfault
Sorry for the late reply. Thanks, Eli. That was really helpful. On Fri, Apr 12, 2019 at 9:31 PM Eli Friedman <efriedma at quicinc.com> wrote: > “--entry main” is not going to do what you want; the entry point for a > Linux program is not equivalent to the C “main”. > http://dbp-consulting.com/tutorials/debugging/linuxProgramStartup.html > has a description of how a C program
2019 Apr 10
2
Cross compiling an empty program results in a segfault
Hello, I'm trying to cross compile an empty program on macOS for Linux: cat test.c int main() { int a = 2+3; return 0; } clang -o -c -target x86_64-linux-gnu test.c If I copy the resulting test.o to the Linux machine and run clang test.o, it works fine. However if I try to link it on macOS, I get a segfault when I launch ./a.out ld.lld --entry main test.o [copy a.out to
2019 Feb 04
2
Compiling for baremetal ARMv4 on Ubuntu Linux
Hello Christian, I've put some comments inline, On Sun, 3 Feb 2019 at 13:11, Christian Richter <christian.richter at hsu-hh.de> wrote: > > Hello again, > > so after I successfully build the compiler-rt for armv6 I tried to > actually use it in compiling a small helloworld for a baremetal arm > (consisting of barehelloCLANG.c and a small io.h + io.c) , but the >
2018 Dec 14
3
Compiling for baremetal ARMv4 on Ubuntu Linux
Hello again Christian, I've posted https://reviews.llvm.org/D55709 to see if we can get the documentation on how to cross-compile compiler-rt improved. I'll be out of office until next year so I may be a bit slow to respond to any follow ups. Peter On Thu, 13 Dec 2018 at 17:10, Peter Smith <peter.smith at linaro.org> wrote: > > Hello Christian, > > I've just
2019 Mar 04
2
Compiling for baremetal ARMv4 on Ubuntu Linux
Hello Christian, I'd expect that adding the library paths (-L) from gcc -v should fix the unable to find -lc, -lm but it won't fix the -lclang_rt.builtins-armv6m.a . To get clang_rt.builtins-armv6m.a you will need to cross compile compiler-rt for v6m and copy it to /usr/local/myclang/lib/clang/8.0.0/lib/baremetal . Beware that building compiler-rt for v6m does need quite a bit of fighting
2018 Dec 13
2
Compiling for baremetal ARMv4 on Ubuntu Linux
Hello Peter and Lists, thanks a lot, that way it worked out! The final cmake was cmake -G "Ninja" ../llvm/projects/compiler-rt/ -DCOMPILER_RT_BUILD_BUILTINS=ON -DCOMPILER_RT_BUILD_SANITIZERS=OFF -DCOMPILER_RT_BUILD_XRAY=OFF -DCOMPILER_RT_BUILD_LIBFUZZER=OFF -DCOMPILER_RT_BUILD_PROFILE=OFF -DCMAKE_C_COMPILER=/usr/local/myclang/bin/clang -DCMAKE_AR=/usr/local/myclang/bin/llvm-ar
2018 Dec 10
2
Compiling for baremetal ARMv4 on Ubuntu Linux
Hello again! Tried out the small Hello World Setup, worked as intended: root at christian-forschung-virtual-machine:/home/progs# clang -v --target=arm-linux-gnueabihf hello.c -o hello -fuse-ld=lld clang version 8.0.0 (https://git.llvm.org/git/clang.git/ a152c7a4b7ba8f4cb9532ead9a38a7121db43d50) (https://git.llvm.org/git/llvm.git/ 1959ce6f3e01241919968ac1911fd45660239d23) Target:
2019 Mar 11
2
Compiling for baremetal ARMv4 on Ubuntu Linux
Hello Christian, I reran my script with a similar cmake command to yours. After the build finished the following command from the build directory gave me: find . -name \*builtins.a ./lib/clang/9.0.0/armv6m-none-eabi/lib/libclang_rt.builtins.a ./lib/clang/9.0.0/armv7m-none-eabi/lib/libclang_rt.builtins.a ./lib/clang/9.0.0/armv7em-none-eabi/lib/libclang_rt.builtins.a I hope you see something like
2019 Feb 07
9
[8.0.0 Release] rc2 has been tagged
Dear testers, 8.0.0-rc2 has been tagged from the release_80 branch at r353413. Please run the test script, share your results, and upload binaries. I'll get the source tarballs and docs published as soon as possible, and binaries as they become available. Thanks, Hans
2018 Dec 07
2
Compiling for baremetal ARMv4 on Ubuntu Linux
Hello, on the problems cross-building compiler-rt: Tried to follow https://llvm.org/docs/HowToCrossCompileBuiltinsOnArm.html which lead to this cmake: cmake -G "Ninja" ../llvm/projects/compiler-rt/ -DCOMPILER_RT_BUILD_BUILTINS=ON -DCOMPILER_RT_BUILD_SANITIZERS=OFF -DCOMPILER_RT_BUILD_XRAY=OFF -DCOMPILER_RT_BUILD_LIBFUZZER=OFF -DCOMPILER_RT_BUILD_PROFILE=OFF
2018 Dec 04
2
Compiling for baremetal ARMv4 on Ubuntu Linux
I am currently trying to compile a pretty simple program to work on an experimental board. It contains an (FPGA-version of) an ARMv4 processor. So basically, I try this (on my Ubuntu 18.04.1 LTS): clang -v --target=arm-none-eabi -c barehello.c -o barehelloCLANG.o clang -v --target=arm-none-eabi -c io.c -o io.o clang -v --target=arm-none-eabi barehelloCLANG.o io.o -o helloCLANGstatic -static
2010 Feb 22
2
ld: Unsatisfied symbol "options" in file ./libssh.a[hostfile.o]
Hi All, I have want to add a option in ssh_config to co-work with ldap.But when I am compiling , i was encountered a ld error, which says "cc -o ssh-keygen ssh-keygen.o -Wl,+nodefaultrpath -L. -Lopenbsd-compat/ -lssh -lopenbsd-compat -lz -lnsl -lxnet -lsec -lgssapi_krb5 -lkrb5 -lpthread ld: Unsatisfied symbol "options" in file ./libssh.a[hostfile.o] 1 errors." The following is
2019 Feb 11
2
[cfe-dev] [8.0.0 Release] rc2 has been tagged
On Fri, Feb 8, 2019 at 9:53 AM Paweł Sikora via cfe-dev < cfe-dev at lists.llvm.org> wrote: > ----- Oryginalna wiadomość ----- > > Dear testers, > > > > 8.0.0-rc2 has been tagged from the release_80 branch at r353413. > > Hi, > > i've noticed a compile error with rc2 and libc++ (release_80 @svn). looks > similar to
2010 Nov 07
2
[LLVMdev] Compiling front end for ARM target
I am trying to compile llvm-gcc for an ARm target. I usine the following configure options: /home/tony/llvm/llvm-gcc/configure --prefix=/home/tony/llvm/llvm-gcc-install/ --program-prefix=llvm-arm- --enable-llvm=/home/tony/llvm/llvm-install/ --enable-pic --disable-bootstrap --target=arm-none-linux-gnueabi --enable-languages=c,c++ Then I try to make: make ENABLE_PROFILING=1 ENABLE_OPTIMIZED=1
2019 Jun 13
4
Clang8 on MacOS 10.14
[Please cc me, as I am not on this list.] When installing the clang8 MacOS binary by wget <clang-binaries-tarball-url> tar -xf clang* cd clang* sudo mkdir /usr/local/clang8 sudo cp -R * /usr/local/clang8 the compiler works on MacOS 10.13, but not on MacOS 10.14, with an error: /usr/local/clang/bin/../include/c++/v1/stdio.h:108:15: fatal error: 'stdio.h' file not found
2010 Nov 08
0
[LLVMdev] Compiling front end for ARM target
On Nov 6, 2010, at 5:22 PM, tonyg362 wrote: > > I am trying to compile llvm-gcc for an ARm target. I usine the following > configure options: > > /home/tony/llvm/llvm-gcc/configure > --prefix=/home/tony/llvm/llvm-gcc-install/ --program-prefix=llvm-arm- > --enable-llvm=/home/tony/llvm/llvm-install/ --enable-pic --disable-bootstrap > --target=arm-none-linux-gnueabi
2012 Jun 20
3
[LLVMdev] Is cross-compiling for ARM on x86 with llvm/Clang possible?
Hello, Thank you for your kind attention to my issue and your help. I changed the tool chain and tried again. And there is a little progress but still have some problem. Using --sysroot doesn't make clang use linker(ld) in the cross tool. Most important question is how I can make clang use cross tool linker. Let me show you my experiment and questions below. There are two questions. [Run]