Sinha, Prokash
2014-Sep-21 03:03 UTC
[LLVMdev] How to get this profile library built from 3.6 source of clang/llvm under freebsd10+
I've the latest 3.6 version of clang/llvm and I can build it using gmake. But I don't get libclang_rt.profile-x86_64.a built. So I guess, I'm not providing the right set of options when I do the configure. Here is the configure I used - ../llvm_9_19/configure --prefix=/fs/home/psinha/bin --enable-targets=x86_64 --enable-profiling When I try to build a simple program using the following options ( without profile option I can build the simple app ) Here is the result - bash$ clang -fprofile-arcs main.c -v clang version 3.6.0 (trunk 218123) Target: x86_64-unknown-freebsd10.0 Thread model: posix "/.automount/nfs.panwest.panasas.com/root/home/psinha/bin/bin/clang" -cc1 -triple x86_64-unknown-freebsd10.0 -emit-obj -mrelax-all -disable-free -main-file-name main.c -mrelocation-model static -mdisable-fp-elim -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version 2.17.50 -v -dwarf-column-info -femit-coverage-data -resource-dir /.automount/nfs.panwest.panasas.com/root/home/psinha/bin/bin/../lib/clang/3.6.0 -fdebug-compilation-dir /fs/home/psinha/pgms/clang -ferror-limit 19 -fmessage-length 131 -mstackrealign -fobjc-runtime=gnustep -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/main-d6a592.o -x c main.c clang -cc1 version 3.6.0 based upon LLVM 3.6.0svn default target x86_64-unknown-freebsd10.0 #include "..." search starts here: #include <...> search starts here: /.automount/nfs.panwest.panasas.com/root/home/psinha/bin/bin/../lib/clang/3.6.0/include /usr/include End of search list. _mcleanup: tos overflow "/usr/bin/ld" --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1 --hash-style=both --enable-new-dtags -o a.out /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib /tmp/main-d6a592.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/crtend.o /usr/lib/crtn.o /.automount/nfs.panwest.panasas.com/root/home/psinha/bin/bin/../lib/clang/3.6.0/lib/freebsd/libclang_rt.profile-x86_64.a /usr/bin/ld: /.automount/nfs.panwest.panasas.com/root/home/psinha/bin/bin/../lib/clang/3.6.0/lib/freebsd/libclang_rt.profile-x86_64.a: No such file: No such file or directory clang: error: linker command failed with exit code 1 (use -v to see invocation) bash$ clang -fprofile-arcs -ftest-coverage main.c -v clang version 3.6.0 (trunk 218123) Target: x86_64-unknown-freebsd10.0 Thread model: posix "/.automount/nfs.panwest.panasas.com/root/home/psinha/bin/bin/clang" -cc1 -triple x86_64-unknown-freebsd10.0 -emit-obj -mrelax-all -disable-free -main-file-name main.c -mrelocation-model static -mdisable-fp-elim -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version 2.17.50 -v -dwarf-column-info -femit-coverage-notes -femit-coverage-data -resource-dir /.automount/nfs.panwest.panasas.com/root/home/psinha/bin/bin/../lib/clang/3.6.0 -fdebug-compilation-dir /fs/home/psinha/pgms/clang -ferror-limit 19 -fmessage-length 131 -mstackrealign -fobjc-runtime=gnustep -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/main-a127fa.o -x c main.c clang -cc1 version 3.6.0 based upon LLVM 3.6.0svn default target x86_64-unknown-freebsd10.0 #include "..." search starts here: #include <...> search starts here: /.automount/nfs.panwest.panasas.com/root/home/psinha/bin/bin/../lib/clang/3.6.0/include /usr/include End of search list. _mcleanup: tos overflow "/usr/bin/ld" --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1 --hash-style=both --enable-new-dtags -o a.out /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib /tmp/main-a127fa.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/crtend.o /usr/lib/crtn.o /.automount/nfs.panwest.panasas.com/root/home/psinha/bin/bin/../lib/clang/3.6.0/lib/freebsd/libclang_rt.profile-x86_64.a /usr/bin/ld: /.automount/nfs.panwest.panasas.com/root/home/psinha/bin/bin/../lib/clang/3.6.0/lib/freebsd/libclang_rt.profile-x86_64.a: No such file: No such file or directory <============= See the archieve file missing. !!!!! clang: error: linker command failed with exit code 1 (use -v to see invocation) I really need some advice as to how to make that archived build. -prokash
Sinha, Prokash
2014-Sep-22 14:23 UTC
[LLVMdev] How to get this profile library built from 3.6 source of clang/llvm under freebsd10+
Just for the heck of it, I tried --enable-profiling==YES, and took a diff of the two trial config.log files. Hardly any differences that matters for enabling this feature. Can someone point me, if this is a known bug or ??? -prokash From: <Sinha>, Prokash Sinha <psinha at panasas.com<mailto:psinha at panasas.com>> Date: Saturday, September 20, 2014 8:03 PM To: "LLVMdev at cs.uiuc.edu<mailto:LLVMdev at cs.uiuc.edu>" <LLVMdev at cs.uiuc.edu<mailto:LLVMdev at cs.uiuc.edu>> Subject: How to get this profile library built from 3.6 source of clang/llvm under freebsd10+ I've the latest 3.6 version of clang/llvm and I can build it using gmake. But I don't get libclang_rt.profile-x86_64.a built. So I guess, I'm not providing the right set of options when I do the configure. Here is the configure I used - ../llvm_9_19/configure --prefix=/fs/home/psinha/bin --enable-targets=x86_64 --enable-profiling When I try to build a simple program using the following options ( without profile option I can build the simple app ) Here is the result - bash$ clang -fprofile-arcs main.c -v clang version 3.6.0 (trunk 218123) Target: x86_64-unknown-freebsd10.0 Thread model: posix "/.automount/nfs.panwest.panasas.com/root/home/psinha/bin/bin/clang" -cc1 -triple x86_64-unknown-freebsd10.0 -emit-obj -mrelax-all -disable-free -main-file-name main.c -mrelocation-model static -mdisable-fp-elim -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version 2.17.50 -v -dwarf-column-info -femit-coverage-data -resource-dir /.automount/nfs.panwest.panasas.com/root/home/psinha/bin/bin/../lib/clang/3.6.0 -fdebug-compilation-dir /fs/home/psinha/pgms/clang -ferror-limit 19 -fmessage-length 131 -mstackrealign -fobjc-runtime=gnustep -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/main-d6a592.o -x c main.c clang -cc1 version 3.6.0 based upon LLVM 3.6.0svn default target x86_64-unknown-freebsd10.0 #include "..." search starts here: #include <...> search starts here: /.automount/nfs.panwest.panasas.com/root/home/psinha/bin/bin/../lib/clang/3.6.0/include /usr/include End of search list. _mcleanup: tos overflow "/usr/bin/ld" --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1 --hash-style=both --enable-new-dtags -o a.out /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib /tmp/main-d6a592.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/crtend.o /usr/lib/crtn.o /.automount/nfs.panwest.panasas.com/root/home/psinha/bin/bin/../lib/clang/3.6.0/lib/freebsd/libclang_rt.profile-x86_64.a /usr/bin/ld: /.automount/nfs.panwest.panasas.com/root/home/psinha/bin/bin/../lib/clang/3.6.0/lib/freebsd/libclang_rt.profile-x86_64.a: No such file: No such file or directory clang: error: linker command failed with exit code 1 (use -v to see invocation) bash$ clang -fprofile-arcs -ftest-coverage main.c -v clang version 3.6.0 (trunk 218123) Target: x86_64-unknown-freebsd10.0 Thread model: posix "/.automount/nfs.panwest.panasas.com/root/home/psinha/bin/bin/clang" -cc1 -triple x86_64-unknown-freebsd10.0 -emit-obj -mrelax-all -disable-free -main-file-name main.c -mrelocation-model static -mdisable-fp-elim -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version 2.17.50 -v -dwarf-column-info -femit-coverage-notes -femit-coverage-data -resource-dir /.automount/nfs.panwest.panasas.com/root/home/psinha/bin/bin/../lib/clang/3.6.0 -fdebug-compilation-dir /fs/home/psinha/pgms/clang -ferror-limit 19 -fmessage-length 131 -mstackrealign -fobjc-runtime=gnustep -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/main-a127fa.o -x c main.c clang -cc1 version 3.6.0 based upon LLVM 3.6.0svn default target x86_64-unknown-freebsd10.0 #include "..." search starts here: #include <...> search starts here: /.automount/nfs.panwest.panasas.com/root/home/psinha/bin/bin/../lib/clang/3.6.0/include /usr/include End of search list. _mcleanup: tos overflow "/usr/bin/ld" --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1 --hash-style=both --enable-new-dtags -o a.out /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib /tmp/main-a127fa.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/crtend.o /usr/lib/crtn.o /.automount/nfs.panwest.panasas.com/root/home/psinha/bin/bin/../lib/clang/3.6.0/lib/freebsd/libclang_rt.profile-x86_64.a /usr/bin/ld: /.automount/nfs.panwest.panasas.com/root/home/psinha/bin/bin/../lib/clang/3.6.0/lib/freebsd/libclang_rt.profile-x86_64.a: No such file: No such file or directory <============= See the archieve file missing. !!!!! clang: error: linker command failed with exit code 1 (use -v to see invocation) I really need some advice as to how to make that archived build. -prokash