bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/24074] ld fails silently when linking MinGW 64-bit app wit


From: address@hidden
Subject: [Bug binutils/24074] ld fails silently when linking MinGW 64-bit app with BOINC libs
Date: Sun, 13 Jan 2019 13:28:18 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=24074

--- Comment #3 from Daniel <address@hidden> ---
(In reply to Nick Clifton from comment #2)
> (In reply to Daniel from comment #0)
> 
> Hi Daniel,
> 
> > I was trying to link 64-bit MinGW app using crosscompiler on CentOS Linux.
> 
> Is the bionic library very big ?  Mysterious failures like this are often 
> caused by the system running out of resources.  Usually memory or disk space.

BOINC, not bionic :) BTW, sources are at https://github.com/BOINC/boinc . Lib
is not big. Machine where I compiled it had 17GB of free HDD space and 64GB
RAM. I also did not saw any "killed" errors caused by OOM from make when
building. In the past I saw them on Odroid, so I am familiar with them.

> Sadly that bit of code is very unhelpful:
> 
>  if (!bfd_final_link (link_info.output_bfd, &link_info))
> [cut]
> So the linker is terminating, and hoping that an error message has already
> been displayed. :-(

Yes, definitely. It would be good to improve this.

> > /usr/lib/gcc/x86_64-w64-mingw32/7.4.0/../../../../x86_64-w64-mingw32/bin/ld:
> >  
> > BFD (GNU Binutils) 2.29.1.20171006 assertion fail /cygdrive/i/szsz
> > /tmpp/cygwin64/mingw64-x86_64/mingw64-x86_64-binutils-2.29.1.787c9873-1.x86_64
> > /src/binutils-gdb/bfd/cofflink.c:265
> 
> OK, well that assertion is checking that size of ordinary symbols and
> auxillary symbols is the same:
> 
>    BFD_ASSERT (symesz == bfd_coff_auxesz (abfd));

Unfortunately gdb under Cygwin for some reason is not catching this crash, I
tried to do it before I logged this issue. I will try to build new binutils on
Linux and see what I will find there. 

In the meantime I found another thing. It turned out that configure script
generates/modifies files which are then used during MinGW build. In fact I had
to edit config.h to disable HAVE_STRCASESTR, but I assumed that someone else
broke MinGW build and this was not fixed yet. These generated files came from
some older BOINC version.

When I cloned BOINC repo in new dir and started build there, I got working
libs. Here are their sizes:

address@hidden mingw64]# ls -lh /boinc2/820/mingw64/lib/
total 488K
-rw-r--r--. 1 root root 413K Jan 12 23:46 libboinc.a
-rw-r--r--. 1 root root  47K Jan 12 23:46 libboinc_api.a
-rw-r--r--. 1 root root  13K Jan 12 23:46 libboinc_graphics2.a
-rw-r--r--. 1 root root 6.9K Jan 12 23:46 libboinc_opencl.a

And this is for broken build:

address@hidden mingw64]# ls -lh /root/boinc82/mingw64/lib/
total 6.7M
-rw-r--r--. 1 root root 6.7M Jan  5 19:00 libboinc.a
-rw-r--r--. 1 root root  47K Jan  5 19:00 libboinc_api.a
-rw-r--r--. 1 root root  13K Jan  5 19:00 libboinc_graphics2.a
-rw-r--r--. 1 root root 6.9K Jan  5 19:00 libboinc_opencl.a

At this moment I do not know if bad code was created by gcc, as or ld - I am
going to find this, and create small testcase so you would be able to reproduce
this. I will either update this issue or log a new one for gcc.

I am attaching broken libs to this issue, so you could check what exactly is
wrong with them.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]