binutils invocation problem on Windows #28

Closed
opened 2020-06-16 18:56:04 +08:00 by sb10q · 4 comments
Owner

After altering the PATH as per #27 there are still problems:

(artiq845) wfvm@DESKTOP-9SOOHO8 C:\Users\wfvm\artiq\artiq\examples\kc705_nist_clock>artiq_compile repository/blink_forever.py
Traceback (most recent call last):
  File "C:\Users\wfvm\Anaconda3\envs\artiq845\Scripts\artiq_compile-script.py", line 9, in <module>
    sys.exit(main())
  File "C:\Users\wfvm\Anaconda3\envs\artiq845\lib\site-packages\artiq\frontend\artiq_compile.py", line 64, in main
    attribute_writeback=False, print_as_rpc=False)
  File "C:\Users\wfvm\Anaconda3\envs\artiq845\lib\site-packages\artiq\coredevice\core.py", line 112, in compile
    library = target.compile_and_link([module])
  File "C:\Users\wfvm\Anaconda3\envs\artiq845\lib\site-packages\artiq\compiler\targets.py", line 191, in compile_and_link
    return self.link([self.assemble(self.compile(module)) for module in modules])
  File "C:\Users\wfvm\Anaconda3\envs\artiq845\lib\site-packages\artiq\compiler\targets.py", line 181, in link
    **{"obj{}".format(index): obj for index, obj in enumerate(objects)}) \
  File "C:\Users\wfvm\Anaconda3\envs\artiq845\lib\site-packages\artiq\compiler\targets.py", line 36, in __enter__
    format(cmdline[0], stderr))
Exception: or1k-linux-ld invocation failed: or1k-linux-ld: final link failed: File truncated
After altering the PATH as per https://git.m-labs.hk/M-Labs/nix-scripts/issues/27 there are still problems: ```text (artiq845) wfvm@DESKTOP-9SOOHO8 C:\Users\wfvm\artiq\artiq\examples\kc705_nist_clock>artiq_compile repository/blink_forever.py Traceback (most recent call last): File "C:\Users\wfvm\Anaconda3\envs\artiq845\Scripts\artiq_compile-script.py", line 9, in <module> sys.exit(main()) File "C:\Users\wfvm\Anaconda3\envs\artiq845\lib\site-packages\artiq\frontend\artiq_compile.py", line 64, in main attribute_writeback=False, print_as_rpc=False) File "C:\Users\wfvm\Anaconda3\envs\artiq845\lib\site-packages\artiq\coredevice\core.py", line 112, in compile library = target.compile_and_link([module]) File "C:\Users\wfvm\Anaconda3\envs\artiq845\lib\site-packages\artiq\compiler\targets.py", line 191, in compile_and_link return self.link([self.assemble(self.compile(module)) for module in modules]) File "C:\Users\wfvm\Anaconda3\envs\artiq845\lib\site-packages\artiq\compiler\targets.py", line 181, in link **{"obj{}".format(index): obj for index, obj in enumerate(objects)}) \ File "C:\Users\wfvm\Anaconda3\envs\artiq845\lib\site-packages\artiq\compiler\targets.py", line 36, in __enter__ format(cmdline[0], stderr)) Exception: or1k-linux-ld invocation failed: or1k-linux-ld: final link failed: File truncated ```
Author
Owner

After b2e40e0594
setting PATH is no longer required, but the error persists.

After https://git.m-labs.hk/M-Labs/nix-scripts/commit/b2e40e0594ea0a0f9562843e4a70e61c30992ff7 setting PATH is no longer required, but the error persists.
Contributor
[error reason in binutils.](https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=bfd/cache.c;h=93abff33fe21006d3d0d4b707ac5f02c5bc39089;hb=d8cc8af6a1787f9c2eafc62a36ac86cf4d08c89c#l332)
Contributor
(gdb) bt
#0  0x000000000043550d in bfd_set_error ()
#1  0x000000000043916f in cache_bread_1 ()
#2  0x00000000004391db in cache_bread ()
#3  0x00000000004382c8 in bfd_bread ()
#4  0x000000000043c2ac in _bfd_generic_get_section_contents ()
#5  0x00000000004463a4 in bfd_get_section_contents ()
#6  0x00000000004a6f16 in bfd_get_full_section_contents ()
#7  0x0000000000489981 in elf_link_input_bfd ()
#8  0x000000000048d4d3 in bfd_elf_final_link ()
#9  0x0000000000420aaa in ldwrite ()
#10 0x000000000041da16 in main ()
``` (gdb) bt #0 0x000000000043550d in bfd_set_error () #1 0x000000000043916f in cache_bread_1 () #2 0x00000000004391db in cache_bread () #3 0x00000000004382c8 in bfd_bread () #4 0x000000000043c2ac in _bfd_generic_get_section_contents () #5 0x00000000004463a4 in bfd_get_section_contents () #6 0x00000000004a6f16 in bfd_get_full_section_contents () #7 0x0000000000489981 in elf_link_input_bfd () #8 0x000000000048d4d3 in bfd_elf_final_link () #9 0x0000000000420aaa in ldwrite () #10 0x000000000041da16 in main () ```
Contributor

Fixed by 89d700a796

Fixed by 89d700a796696c18c3c34039359dae2751dce6a1
sb10q closed this issue 2020-07-24 17:01:53 +08:00
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/nix-scripts#28
No description provided.