[Bug binutils/21702] ar cannot handle (slim) LTO object files when in MRI script mode
https://sourceware.org/bugzilla/show_bug.cgi?id=21702 Nick Clifton changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |FIXED --- Comment #18 from Nick Clifton --- It did take a bit of tracking down, but I am glad that I found it in the end. Patch applied. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug binutils/21702] ar cannot handle (slim) LTO object files when in MRI script mode
https://sourceware.org/bugzilla/show_bug.cgi?id=21702 --- Comment #17 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Nick Clifton : https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=229597a129f62d5e8a101f1eed95489e2399f741 commit 229597a129f62d5e8a101f1eed95489e2399f741 Author: Nick Clifton Date: Mon Apr 19 17:38:39 2021 +0100 Fix a problem running the archiver program in MRI mode on archives containing LTO compiled objects. PR 21702 * arsup.c (ar_addmod): Enable plugin support, if available. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug binutils/21702] ar cannot handle (slim) LTO object files when in MRI script mode
https://sourceware.org/bugzilla/show_bug.cgi?id=21702 --- Comment #16 from Pavel <12f8219 at gmail dot com> --- (In reply to Nick Clifton from comment #15) > Created attachment 13378 [details] > Proposed patch > > Ah ha - I think that I have it. Please could you try this uploaded patch ? yep. this patch fixes it. i never would have guessed that problem is not in 'save' or 'write' but in 'open'. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug binutils/21702] ar cannot handle (slim) LTO object files when in MRI script mode
https://sourceware.org/bugzilla/show_bug.cgi?id=21702 --- Comment #15 from Nick Clifton --- Created attachment 13378 --> https://sourceware.org/bugzilla/attachment.cgi?id=13378=edit Proposed patch Ah ha - I think that I have it. Please could you try this uploaded patch ? -- You are receiving this mail because: You are on the CC list for the bug.
[Bug binutils/21702] ar cannot handle (slim) LTO object files when in MRI script mode
https://sourceware.org/bugzilla/show_bug.cgi?id=21702 --- Comment #14 from Pavel <12f8219 at gmail dot com> --- sorry, i dont know what today mainline version is, but 2.36.1 also fails: /var/tmp/portage/sys-devel/binutils-2.36.1/image/usr/x86_64-gentoo-linux-musl/binutils-bin/2.36.1/ar --plugin /usr/lib/bfd-plugins/liblto_plugin.so -M /var/tmp/portage/sys-devel/binutils-2.36.1/image/usr/x86_64-gentoo-linux-musl/binutils-bin/2.36.1/ar: l.a(t.o): plugin needed to handle lto object -- You are receiving this mail because: You are on the CC list for the bug.
[Bug binutils/21702] ar cannot handle (slim) LTO object files when in MRI script mode
https://sourceware.org/bugzilla/show_bug.cgi?id=21702 --- Comment #13 from Nick Clifton --- (In reply to Pavel from comment #12) Sorry, I am not quite sure what to do with these files. I tried this: % ar --plugin=/usr/lib64/bfd-plugins/liblto_plugin.so -M AR >open -AbO.a AR >save AR >end There were no error messages about missing plugins. Note - this was with the latest version of ar built from today's mainline binutils sources. When I used the system version of ar, I did get the error message: % /usr/bin/ar --plugin=/usr/lib64/bfd-plugins/liblto_plugin.so -M AR >open -AbO.a AR >save /usr/bin/ar: -AbO.a(t.o): plugin needed to handle lto object AR >end Cheers Nick -- You are receiving this mail because: You are on the CC list for the bug.
[Bug binutils/21702] ar cannot handle (slim) LTO object files when in MRI script mode
https://sourceware.org/bugzilla/show_bug.cgi?id=21702 --- Comment #12 from Pavel <12f8219 at gmail dot com> --- http://0x0.st/-Abf.o http://0x0.st/-AbO.a -- You are receiving this mail because: You are on the CC list for the bug.
[Bug binutils/21702] ar cannot handle (slim) LTO object files when in MRI script mode
https://sourceware.org/bugzilla/show_bug.cgi?id=21702 --- Comment #11 from Pavel <12f8219 at gmail dot com> --- (In reply to Nick Clifton from comment #10) > (In reply to Pavel from comment #9) > Hi Pavel, > > Please can you see if it is possible to reduce the list of object files a > little bit, and then upload them so that I can run some tests ? > > Cheers > Nick #!/bin/sh readlink -f /usr/bin/ar echo 'int main() {return 0;}' > t.c set -x gcc -flto -c t.c /usr/bin/ar crsv l.a t.o echo ' open l.a list end' | /usr/bin/ar -M echo ' open l.a save end' | /usr/bin/ar -M gcc -flto -fuse-linker-plugin l.a -o t -- You are receiving this mail because: You are on the CC list for the bug.
[Bug binutils/21702] ar cannot handle (slim) LTO object files when in MRI script mode
https://sourceware.org/bugzilla/show_bug.cgi?id=21702 Nick Clifton changed: What|Removed |Added Resolution|FIXED |--- Status|RESOLVED|REOPENED --- Comment #10 from Nick Clifton --- (In reply to Pavel from comment #9) Hi Pavel, Please can you see if it is possible to reduce the list of object files a little bit, and then upload them so that I can run some tests ? Cheers Nick -- You are receiving this mail because: You are on the CC list for the bug.
[Bug binutils/21702] ar cannot handle (slim) LTO object files when in MRI script mode
https://sourceware.org/bugzilla/show_bug.cgi?id=21702 Pavel <12f8219 at gmail dot com> changed: What|Removed |Added CC||12f8219 at gmail dot com --- Comment #9 from Pavel <12f8219 at gmail dot com> --- .root@h Xext 0# ar crs .libs/libXext.a .libs/bigreq.o .libs/geext.o .libs/shape.o .libs/sleepuntil.o .libs/sync.o .libs/xcmisc.o .libs/xtest.o .libs/shm.o .libs/xvmain.o .libs/xvdisp.o .libs/xvmc.o .libs/xres.o .libs/dpms.o .root@h Xext 0# ar tv .libs/libXext.a rw-r--r-- 0/0 23104 Jan 1 02:00 1970 bigreq.o rw-r--r-- 0/0 68008 Jan 1 02:00 1970 geext.o rw-r--r-- 0/0 211184 Jan 1 02:00 1970 shape.o rw-r--r-- 0/0 37032 Jan 1 02:00 1970 sleepuntil.o rw-r--r-- 0/0 424360 Jan 1 02:00 1970 sync.o rw-r--r-- 0/0 45368 Jan 1 02:00 1970 xcmisc.o rw-r--r-- 0/0 211632 Jan 1 02:00 1970 xtest.o rw-r--r-- 0/0 278704 Jan 1 02:00 1970 shm.o rw-r--r-- 0/0 218928 Jan 1 02:00 1970 xvmain.o rw-r--r-- 0/0 358776 Jan 1 02:00 1970 xvdisp.o rw-r--r-- 0/0 184584 Jan 1 02:00 1970 xvmc.o rw-r--r-- 0/0 157936 Jan 1 02:00 1970 xres.o rw-r--r-- 0/0 110824 Jan 1 02:00 1970 dpms.o .root@h Xext 0# ar -M <
[Bug binutils/21702] ar cannot handle (slim) LTO object files when in MRI script mode
https://sourceware.org/bugzilla/show_bug.cgi?id=21702 --- Comment #8 from Martin Schulze --- I'll keep my eyes open. Thanks for the fast solution. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/21702] ar cannot handle (slim) LTO object files when in MRI script mode
https://sourceware.org/bugzilla/show_bug.cgi?id=21702 Nick Clifton changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #7 from Nick Clifton --- Hi Martin, OK - I have applied the patch. If more problems like this arise, please feel free to reopen this PR, or create a new one. Cheers Nick -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/21702] ar cannot handle (slim) LTO object files when in MRI script mode
https://sourceware.org/bugzilla/show_bug.cgi?id=21702 --- Comment #6 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Nick Clifton: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=70b0cf90bc6c071895b989666bcf3e6eca7b99ce commit 70b0cf90bc6c071895b989666bcf3e6eca7b99ce Author: Nick Clifton Date: Wed Aug 2 12:12:37 2017 +0100 Add support for creating archives of slim-LTO modules using MRi script commands. PR 21702 * arsup.c (ar_addmod): Add plugin support for the MRI ADDMOD command. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/21702] ar cannot handle (slim) LTO object files when in MRI script mode
https://sourceware.org/bugzilla/show_bug.cgi?id=21702 --- Comment #5 from Martin Schulze --- Sorry about the confusion, I see now that it was worded ambiguously. I tried the patch and it works. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/21702] ar cannot handle (slim) LTO object files when in MRI script mode
https://sourceware.org/bugzilla/show_bug.cgi?id=21702 Nick Clifton changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2017-08-01 Ever confirmed|0 |1 -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/21702] ar cannot handle (slim) LTO object files when in MRI script mode
https://sourceware.org/bugzilla/show_bug.cgi?id=21702 --- Comment #4 from Nick Clifton --- Created attachment 10298 --> https://sourceware.org/bugzilla/attachment.cgi?id=10298=edit Proposed patch Hi Martin, Ah - I was confused by comment #1 which made me think that the problem also applied in non-MRI mode. Anyway, please can you try out this patch and let me know if it works for you. I am not an MRI expert, but I suspect that the patch might need to be extended to cope with other things that can be done with MRI scripts. If you find anything like this please let me know. Cheers Nick -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/21702] ar cannot handle (slim) LTO object files when in MRI script mode
https://sourceware.org/bugzilla/show_bug.cgi?id=21702 --- Comment #3 from Martin Schulze --- Hi Nick, thanks for your reply. Yes, Arch compiles with --enable-plugins. Otherwise the linking while using the command line (ar rcs ...) wouldn't work too. I already tried to add the --plugin option to no avail. Furthermore, Arch's gcc package defaults to creating the symlink /usr/lib/bfd-plugins/liblto_plugin.so -> /usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/liblto_plugin.so so it should also be found via this method (as it seems to be with the `ar rcs ...` call). I think the problem is that the plugin is not loaded in MRI mode where it should be. This is illustrated nicely by the fact that following call works as expected (without any plugin option): ar rcs libfunc.non-mri.a func.o While these two both give an error: ar -M < mri_script ar: func.o: plugin needed to handle lto object ar --plugin=/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/liblto_plugin.so -M < mri_script ar: func.o: plugin needed to handle lto object -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/21702] ar cannot handle (slim) LTO object files when in MRI script mode
https://sourceware.org/bugzilla/show_bug.cgi?id=21702 Nick Clifton changed: What|Removed |Added CC||nickc at redhat dot com --- Comment #2 from Nick Clifton --- Hi Martin, This is a build/system installation issue more than anything. Assuming that ar has been configured with --enable-plugins set[1] then the problem is that ar is not finding the plugin that it needs. They are two ways that it can find the plugin. The first is via a command line option to ar itself, vis: --plugin=. This is the better solution, IMHO, although it does mean that you will have to update your build framework. The second method is that ar (and the other binutils that support plugins) will look in the directory /usr/lib/bfd-plugins for the plugin. So if you copy gcc's liblto_plugin into this directory everything should start to work. I am not a fan of this method since it relies upon having admin access on the build machine, and it is easy to forget that the directory is there, and then have problems because an out of date plugin is being used. Cheers Nick [1] I am not familiar with Arch Linux, but I suspect that plugin support is probably enabled. Most distributions do that now. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/21702] ar cannot handle (slim) LTO object files when in MRI script mode
https://sourceware.org/bugzilla/show_bug.cgi?id=21702 --- Comment #1 from Martin Schulze --- I just noticed that the problem is reproducible with "normal" ar. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/21702] ar cannot handle (slim) LTO object files when in MRI script mode
https://sourceware.org/bugzilla/show_bug.cgi?id=21702 Martin Schulze changed: What|Removed |Added Summary|MinGW ar cannot handle LTO |ar cannot handle (slim) LTO |object files when in MRI|object files when in MRI |script mode |script mode -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils