Skip Menu |

This queue is for tickets about the Perl-Dist-Strawberry CPAN distribution.

Report information
The Basics
Id: 66737
Status: resolved
Priority: 0/
Queue: Perl-Dist-Strawberry

People
Owner: Nobody in particular
Requestors: egman.ekki [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 2.50
Fixed in: (no value)



Subject: Library include order for gcc
Hello, I am testing building modules from CPAN using Strawberry Perl and I wanted to find out whether it breaks if I install MinGW separately. Since MinGW does not modify PATH variable during installation, the gcc, as, ld executables are really from Strawberry, but I found out that some libraries are picked up from MinGW's folder. Example: Building Text::Iconv v1.7. Strawberry Perl 5.10.1 installed to C:\strawberry. MinGW with gcc 4.5.2 installed in C:\MinGW. Writing Makefile for this module fails, because it picks up crt2.o from C:\MinGW\lib and not from C:/strawberry/c/bin/../lib/gcc/mingw32/3.4.5/../../../ (== C:\strawberry\lib). I tried to build the C source file (iconvtest.c) from module's Makefile.PL: #include <iconv.h> int main(void) { (void) iconv_open("", ""); } using their compilation command: gcc -v -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT - DPERL_IMPLICIT_SYS -fno-strict-aliasing -DPERL_MSVCRT_READFIX -s -L"C:\strawberry\perl\lib\CORE" - L"C:\strawberry\c\lib" -liconv -o iconvtest iconvtest.c -liconv The compilation fails. The problem is that collect2.exe looks for crt2.o in gcc search paths, which for the gcc supplied with Strawberry Perl 5.10.1 is: C:/strawberry/c/bin/../lib/gcc/mingw32/3.4.5/; C:/strawberry/c/bin/../lib/gcc/; /mingw/lib/gcc/mingw32/3.4.5/; /usr/lib/gcc/mingw32/3.4.5/; C:/strawberry/c/bin/../lib/gcc/mingw32/3.4.5/../../../../mingw32/lib/mingw32/3.4.5/; C:/strawberry/c/bin/../lib/gcc/mingw32/3.4.5/../../../../mingw32/lib/; /mingw/lib/gcc/mingw32/../../../mingw32/lib/mingw32/3.4.5/; /mingw/lib/gcc/mingw32/../../../mingw32/lib/; /mingw/lib/mingw32/3.4.5/; /mingw/lib/; C:/strawberry/c/bin/../lib/gcc/mingw32/3.4.5/../../../mingw32/3.4.5/; C:/strawberry/c/bin/../lib/gcc/mingw32/3.4.5/../../../; /mingw/lib/gcc/mingw32/../../mingw32/3.4.5/;/mingw/lib/gcc/mingw32/../../; /lib/mingw32/3.4.5/; /lib/; /usr/lib/mingw32/3.4.5/; /usr/lib/ (It is slightly different if C:\MinGW does not exist, though). Since crt2.o resides in C:\strawberry\lib, but also in C:\MinGW\lib, in this particular case, the problem is that /mingw/lib is listed before C:/strawberry/c/bin/../lib/gcc/mingw32/3.4.5/../../../ The compilation works OK if LIBRARY_PATH is set to C:\strawberry\lib. I think that Strawberry Perl's library paths should be all before /mingw/... paths, but maybe there is a reason, why this particular order of search path was chosen. Could you please clarify? Thank you.
From: egman.ekki [...] gmail.com
Correction: C:\strawberry\lib --> C:\strawberry\c\lib C:/strawberry/c/bin/../lib/gcc/mingw32/3.4.5/../../../ (== C:\strawberry\c\lib). and crt2.o is located in C:\strawberry\c\lib
Hi,

first of all it is little bit dangerous to mix strawberry perl with other gcc compiler than the originaly packed gcc.

Next, it is not so easy to influence the search order you are talking about (it has to be "hacked" when building gcc).

Could you please check the latest 5.14.2.1 if it still does not fit your needs?

--
kmx

Sending the previous mail has failed. Please contact your admin, they can find more details in the logs.
Sending the previous mail has failed. Please contact your admin, they can find more details in the logs.
Could you please check the latest 5.14.2.1 if it still does not fit your needs?

--
kmx