inevity / gperftools

Automatically exported from code.google.com/p/gperftools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

MinGW build error for gpertools 2.1. Problems with linker #650

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. ./configure CXX=/c/mingw64/bin/g++.exe --prefix=/d/gpertools/install
2.  mingw32-make.exe

What is the expected output? What do you see instead?

Expected to compile without problems.

Instead I get this output:

C:/MinGW/msys/1.0/bin/sh.exe ./libtool  --tag=CXX   --mode=link 
/c/mingw64/bin/g++.exe -DNO_TCMALLOC_SAMPLES -g -no-undefined   -o 
low_level_alloc_unittest.exe low_level_alloc_unittest-low_level_alloc.o 
low_level_alloc_unittest-malloc_hook.o  
low_level_alloc_unittest-low_level_alloc_unittest.o   libwindows.la 
libspinlock.la libsysinfo.la liblogging.la 
libtool: link: /c/mingw64/bin/g++.exe -DNO_TCMALLOC_SAMPLES -g -o 
low_level_alloc_unittest.exe low_level_alloc_unittest-low_level_alloc.o 
low_level_alloc_unittest-malloc_hook.o 
low_level_alloc_unittest-low_level_alloc_unittest.o  ./.libs/libwindows.a 
-lpsapi ./.libs/libspinlock.a ./.libs/libsysinfo.a -lshlwapi 
./.libs/liblogging.a

./libs/libwindows.a: could not read symbols: Archive has no index; run ranlib 
to add one.
collect2: ld returned 1 exit status
mingw32-make.exe: *** [low_level_alloc_unittest.exe] Error 1

I tried to run ranlib to libwindows.a but nothing changed.

What version of the product are you using? On what operating system?

gperftools 2.1

Windows 8.1 64 bits, using the gitsys terminal.

MinGW for 64 bits, MinGW rather old: g++ version = 4.5.4, make version = 

Please provide any additional information below.

Original issue reported on code.google.com by acsantome on 19 Sep 2014 at 12:51

GoogleCodeExporter commented 9 years ago
Just couple ideas, don't know if it will help:

* may I have config.log from your src tree. It's log of all stuff that 
configure did

* may I have full log of build from your box ?

* may I ask you to give full instructions on how I can duplicate your 
environment ?

Original comment by alkondratenko on 20 Sep 2014 at 11:15

GoogleCodeExporter commented 9 years ago
Also please retry with latest version which is 2.2.1

Original comment by alkondratenko on 20 Sep 2014 at 11:15

GoogleCodeExporter commented 9 years ago
Hi!

I tried with version 2.2.1 (which for some reason I can't find in the Downloads 
page, only in the main page) and got the same "could not read symbols: Archive 
has no index" error.

I'll upload the config logs for both versions. I obtained the build logs 
redirecting the make output to a file. If this is not what you meant, I'll 
upload whatever you ask :)

One important thing that I missed to tell: with gitsys the make process crashed 
(a Windows dialog appeared with the only option to accept). I had to use the 
msys environment (I installed it from the mingw-get-setup.exe in 
http://www.mingw.org/wiki/Getting_Started).

That's for the environment only. The compiler and mingw64 installation was 
already in my pc when I started working in the company.

As I said, it's old and it's the version everybody uses here to work (no C++11 
for now :( ). I can't reach the person who built this, but it's a 64 bit 
compilation and I think the system where it was built was Windows 7. When they 
upgraded the OS the mingw64 folder was simply copied into it.

Make --version reports a 3.82 version from 2010.

g++ --version reports a 4.54 version from October, 2011.

Original comment by acsantome on 22 Sep 2014 at 8:02

Attachments:

GoogleCodeExporter commented 9 years ago
mingw64 works on my cygwin environment and works on my debian environment. I've 
just tried official mingw32 installer and was able to build gperftools without 
any problems too.

There is strong chance that something isn't right with your installation, but I 
cannot confirm that without being able to reproduce your setup.

Consider installing mingw64 either via cygwin or via some other ways (e.g.: 
http://ascend4.org/Setting_up_a_MinGW-w64_build_environment)

Original comment by alkondratenko on 29 Nov 2014 at 10:43

GoogleCodeExporter commented 9 years ago
Issue 633 has been merged into this issue.

Original comment by alkondratenko on 29 Nov 2014 at 10:46

GoogleCodeExporter commented 9 years ago
Thanks for your time. I'll try with a fresgh MinGW isntallation.

Original comment by acsantome on 1 Dec 2014 at 9:57