{"action":"closed","issue":{"url":"https://api.github.com/repos/avr-llvm/llvm/issues/165","labels_url":"https://api.github.com/repos/avr-llvm/llvm/issues/165/labels{/name}","comments_url":"https://api.github.com/repos/avr-llvm/llvm/issues/165/comments","events_url":"https://api.github.com/repos/avr-llvm/llvm/issues/165/events","html_url":"https://github.com/avr-llvm/llvm/issues/165","id":107647184,"number":165,"title":"Archive index issue","user":{"login":"4ntoine","id":846671,"avatar_url":"https://avatars.githubusercontent.com/u/846671?v=3","gravatar_id":"","url":"https://api.github.com/users/4ntoine","html_url":"https://github.com/4ntoine","followers_url":"https://api.github.com/users/4ntoine/followers","following_url":"https://api.github.com/users/4ntoine/following{/other_user}","gists_url":"https://api.github.com/users/4ntoine/gists{/gist_id}","starred_url":"https://api.github.com/users/4ntoine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4ntoine/subscriptions","organizations_url":"https://api.github.com/users/4ntoine/orgs","repos_url":"https://api.github.com/users/4ntoine/repos","events_url":"https://api.github.com/users/4ntoine/events{/privacy}","received_events_url":"https://api.github.com/users/4ntoine/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-09-22T05:07:46Z","updated_at":"2015-09-24T20:14:54Z","closed_at":"2015-09-24T20:14:54Z","body":"1) I've compiled few files into .o like this:\r\n\r\n```\r\n./clang -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/cores/arduino -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/variants/standard -I/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr/include --target=avr  /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/cores/arduino/WString.cpp -o /tmp/arduino_test1/WString.cpp.o\r\n```\r\n\r\n2)  created archive:\r\n```\r\n./llvm-ar rcs /tmp/arduino_test1/core.a /tmp/arduino_test1/WString.cpp.o\r\n```\r\n\r\n3) link like this:\r\n```\r\n/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-gcc -w -Os -Wl,--gc-sections,--relax -mmcu=atmega328p -o /tmp/arduino_test1/Blink.cpp.elf /tmp/arduino_test1/Blink.cpp.o /tmp/arduino_test1/core.a -L/tmp/arduino_test1 -lm\r\n```\r\n\r\nI've got an error:\r\n```\r\n/tmp/arduino_test1/core.a: could not read symbols: Archive has no index; run ranlib to add one\r\ncollect2: error: ld returned 1 exit status\r\n```\r\n\r\nShould i need system linker or avr's clang from compiled binaries? i believe i've read linker is not provided and it will use system linker anyway. Is it correct?\r\n\r\n4) Add index to archive:\r\n```\r\n./llvm-ranlib /tmp/arduino_test1/core.a\r\n```\r\n\r\n5) try to link again and still get the same error as in 3)\r\n\r\n"}}