[Intel-gfx] [intelddx][strlcpy | strlcat | clock_gettime] clang-3.8: error: linker command failed with exit code 1

Sedat Dilek sedat.dilek at gmail.com
Thu Mar 24 10:44:45 UTC 2016


[ Please see attached files (build-script, full logs etc.) ]

With my selfmade llvm-toolchain v3.8.0 I see these errors/warnings...

$ egrep -B2 -i 'linker command failed|undefined reference to' config.log
 "/usr/bin/ld" -z relro --hash-style=gnu --build-id --eh-frame-hdr -m
elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o conftest
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crt1.o
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crti.o
/usr/lib/gcc/x86_64-linux-gnu/4.9/crtbegin.o
-L/usr/lib/gcc/x86_64-linux-gnu/4.9
-L/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu
-L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu
-L/usr/lib/gcc/x86_64-linux-gnu/4.9/../../..
-L/opt/llvm-toolchain-3.8.0/bin/../lib -L/lib -L/usr/lib
/tmp/conftest-467d35.o -lgcc --as-needed -lgcc_s --no-as-needed -lc
-lgcc --as-needed -lgcc_s --no-as-needed
/usr/lib/gcc/x86_64-linux-gnu/4.9/crtend.o
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crtn.o
/tmp/conftest-467d35.o: In function `main':
conftest.c:(.text+0x12): undefined reference to `strlcpy'
clang-3.8: error: linker command failed with exit code 1 (use -v to
see invocation)
--
 "/usr/bin/ld" -z relro --hash-style=gnu --build-id --eh-frame-hdr -m
elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o conftest
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crt1.o
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crti.o
/usr/lib/gcc/x86_64-linux-gnu/4.9/crtbegin.o
-L/usr/lib/gcc/x86_64-linux-gnu/4.9
-L/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu
-L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu
-L/usr/lib/gcc/x86_64-linux-gnu/4.9/../../..
-L/opt/llvm-toolchain-3.8.0/bin/../lib -L/lib -L/usr/lib
/tmp/conftest-934a03.o -lgcc --as-needed -lgcc_s --no-as-needed -lc
-lgcc --as-needed -lgcc_s --no-as-needed
/usr/lib/gcc/x86_64-linux-gnu/4.9/crtend.o
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crtn.o
/tmp/conftest-934a03.o: In function `main':
conftest.c:(.text+0x12): undefined reference to `strlcat'
clang-3.8: error: linker command failed with exit code 1 (use -v to
see invocation)
--
 "/usr/bin/ld" -z relro --hash-style=gnu --build-id --eh-frame-hdr -m
elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o conftest
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crt1.o
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crti.o
/usr/lib/gcc/x86_64-linux-gnu/4.9/crtbegin.o
-L/usr/lib/gcc/x86_64-linux-gnu/4.9
-L/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu
-L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu
-L/usr/lib/gcc/x86_64-linux-gnu/4.9/../../..
-L/opt/llvm-toolchain-3.8.0/bin/../lib -L/lib -L/usr/lib
/tmp/conftest-36ad4e.o -lgcc --as-needed -lgcc_s --no-as-needed -lc
-lgcc --as-needed -lgcc_s --no-as-needed
/usr/lib/gcc/x86_64-linux-gnu/4.9/crtend.o
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crtn.o
/tmp/conftest-36ad4e.o: In function `main':
conftest.c:(.text+0x12): undefined reference to `clock_gettime'
clang-3.8: error: linker command failed with exit code 1 (use -v to
see invocation)

Furthermore, my 'clang -v' output...

$ clang -v
clang version 3.8.0 (tags/RELEASE_380/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/llvm/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.2
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64

If you need more inputs/informations, please let me know.

Hope this helps.

- Sedat -
-------------- next part --------------
diff --git a/Makefile.am b/Makefile.am
index c60e8a729271..396f41fdc4df 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -18,7 +18,7 @@
 #  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 #  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-ACLOCAL_AMFLAGS = $(ACLOCAL_FLAGS) -I m4
+ACLOCAL_AMFLAGS = -I m4
 
 SUBDIRS = man libobj xvmc src tools
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.log.gz
Type: application/x-gzip
Size: 20058 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20160324/04270e9a/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure-intelddx-2-99-917-580-gf656f6afa288_tearfree-enabled_llvm-3-8-0.txt.gz
Type: application/x-gzip
Size: 4104 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20160324/04270e9a/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build_xf86-video-intel-with-llvm.sh
Type: application/x-sh
Size: 2291 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20160324/04270e9a/attachment-0001.sh>


More information about the Intel-gfx mailing list