Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ar archiver issue #13

Closed
raysan5 opened this issue Sep 23, 2021 · 4 comments
Closed

ar archiver issue #13

raysan5 opened this issue Sep 23, 2021 · 4 comments

Comments

@raysan5
Copy link

raysan5 commented Sep 23, 2021

When using w64devkit ar tool, I got a popup about an errors on libdep.a. The popup appears twice and after accepting it both times the library is correctly archived and works on further compilations with no error. It happens with both i686 and x86_64 versions.

w64devkit_ar_issue

Environment:

  CPU: Intel(R) Core(TM) i7-3537U CPU @ 2.00GHz
  RAM: 8 GB
  OS: Windows 10 Pro 64bit (21H1, 19043.1165)

  Command line: 
    C:\raylib\w64devkit\bin\ar.exe rcs libraylib.a rcore.o rglfw.o rshapes.o rtextures.o rtext.o rmodels.o raudio.o utils.o

I'll try on a second computer to see if it happens the same.

@raysan5
Copy link
Author

raysan5 commented Sep 23, 2021

More info. I took a quick look to libdep.a and this is what I got:

C:\raylib\w64devkit\bin>objdump -a ../lib/bfd-plugins/libdep.a
In archive ../lib/bfd-plugins/libdep.a:

libdep_plugin.o:     file format pe-i386
rw-r--r-- 0/0   3564 Sep 18 02:48 2021 libdep_plugin.o


C:\raylib\w64devkit\bin>objdump -f ../lib/bfd-plugins/libdep.a
In archive ../lib/bfd-plugins/libdep.a:

libdep_plugin.o:     file format pe-i386
architecture: i386, flags 0x00000039:
HAS_RELOC, HAS_DEBUG, HAS_SYMS, HAS_LOCALS
start address 0x00000000


C:\raylib\w64devkit\bin>nm -gD ../lib/bfd-plugins/libdep.a

libdep_plugin.o:
nm: libdep_plugin.o: no symbols


C:\raylib\w64devkit\bin>nm -g ../lib/bfd-plugins/libdep.a

libdep_plugin.o:
         U __imp__isspace
         U _fflush
         U _free
         U _lseek64
         U _malloc
         U _memmove
00000484 T _onload
         U _read
         U _strchr
         U _strcmp
         U _strdup
         U _strlen
         U _strncmp
         U _strtoul

When running the nm command, I got the previous popup twice again.

EDIT: I checked my previous MinGW version (MinGW-w64 32bit, GCC 8.2.0) and libdep.a does not exist.

@raysan5
Copy link
Author

raysan5 commented Sep 23, 2021

Ok, after a quick Google of the issue, found it here: msys2/MINGW-packages#7890

EDIT: Removing w64devkit/lib/bfd-plugins directory and the libdep.a file solves the issue... I love computers...

@raysan5 raysan5 closed this as completed Sep 23, 2021
@skeeto
Copy link
Owner

skeeto commented Sep 23, 2021 via email

@raysan5
Copy link
Author

raysan5 commented Sep 23, 2021

@skeeto Thanks for the detailed explanation! For now, just removing it does the trick. Afaik it does not affect any other tool.

skeeto added a commit that referenced this issue Sep 23, 2021
These options are autoconf-generated and unused by Binutils. Not only do
they not do anything useful, but worse, they cause incorrect Binutils
builds. Plugins, which are supposed to be dynamically-loaded, instead
become useless, static archives.

Fixes #13.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants