[eiffel-users] MingW version update?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[eiffel-users] MingW version update?

ctillman
Hi,

I'm trying to update an application which relied on libffi, from 32-bit to 64-bit. In particular, I'm trying to get the app to compile (freeze) under EiffelStudio 17.01 in Windows 7 64-bit.

I tried using downloaded libffi binaries pre-built for 64-bit mingw, but I get messages like "undefined reference to '__chkstk_ms'" in the compilation window. According to what I read about that online, that's due to incompatible versions of gcc between what is being used to compile vs. what was used to build the binary. At the path in the EiffelStudio installation

C:\Program Files\Eiffel Software\EiffelStudio 17.01 GPL\gcc\win64\mingw\bin

I see the gcc version is

$ gcc --version
gcc.exe (GCC) 4.4.5 20100710 (prerelease) [svn/rev.162041 - mingw-w64/oz]

And this differs from any downloaded binary, as you might expect, being a 7 years old prerelease version?

So I tried to build libffi from source (3.2.1) in the 

C:\Program Files\Eiffel Software\EiffelStudio 17.01 GPL\gcc\win64\msys\1.0

directory using msys.bat. This gave me problems too. In the extracted source directory, I got space-in-the-path issues from configure. I highlighted the first example in the excerpted output below where that has happened ... line breaks have been inserted into the variable contents.

--
$ ./configure --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32
checking build system type... x86_64-w64-mingw32
checking host system type... x86_64-w64-mingw32
...
checking for fgrep... /bin/grep -F
checking for ld used by x86_64-w64-mingw32-gcc... c:/program
files/eiffel
software/eiffelstudio
17.01
gpl/gcc/win64/mingw/x86_64-w64-mingw32/bin/ld.exe
checking if the linker (c:/program
files/eiffel
software/eiffelstudio
17.01
gpl/gcc/win64/mingw/x86_64-w64-mingw32/bin/ld.exe) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... \Program Files\Eiffel Software\EiffelStudio 17.01 GPL\gcc\win64\m
ingw\bin/nm
checking the name lister (\Program Files\Eiffel Software\EiffelStudio 17.01 GPL\gcc\win64\mingw\bin/nm) interface... BSD
 nm
checking whether ln -s works... no, using cp -pR
...
config.status: executing src commands
configure: WARNING: cache variable lt_cv_path_LD contains a newline
configure: WARNING: cache variable lt_cv_path_LDCXX contains a newline
--

When I try to make using this, I find that configure has built the line-separated path into the Makefiles in each folder, for example here in an excerpt from the main Makefile. 

--
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
LD = c:/program
LDFLAGS = 
...
--

Even trying it in the newest version of MingW using gcc 7.1.0 I get similar issues.

So going back to the Eiffel path msys.bat prompt, and using

$ export PATH="$PATH:/c/Program Files/Eiffel Software/EiffelStudio 17.01 GPL/gcc/win64/mingw/bin"
$ export LD="/c/Program Files/Eiffel Software/EiffelStudio 17.01 GPL/gcc/win64/mingw/bin/ld.exe"

... I avoided the path errors. But unfortunately make still comes down to an error after all that.

make[3]: Entering directory `/c/Users/user/Downloads/Installers/Mingw-libffi/libffi-3.2.1/x86_64-w64-mingw32'
...
/bin/sh ./libtool  --tag=CC   --mode=link x86_64-w64-mingw32-gcc  -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -march=core2  -Wall -fexceptions   -o libffi_convenience.la  src/prep_cif.lo src/types.lo src/raw_api.lo src/java_raw_api.lo src/closures.lo       src/x86/ffi.lo src/x86/win64.lo
libtool: link: lib -OUT:.libs/libffi_convenience.lib src/.libs/prep_cif.o src/.libs/types.o src/.libs/raw_api.o src/.libs/java_raw_api.o src/.libs/closures.o src/x86/.libs/ffi.o src/x86/.libs/win64.o
./libtool: line 1106: lib: command not found
make[3]: *** [libffi_convenience.la] Error 127


Will Eiffel be updated to use a newer version of mingw under the covers? It seems like a "during-the-32-to-64-bit transition" version is in use and the newer versions probably have much better 64-bit support.

Would that even help? Maybe I need a different approach.

--
Chris Tillman
Developer

--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/eiffel-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

RE: [eiffel-users] MingW version update?

Emmanuel Stapf
Administrator

Hi,

 

Updating gcc is always troublesome so we only update it when needed. I believe last time we tried there was some blocking issue so we stuck to the existing version. We may want to revisit for the next release. To make your testing easier, I would recommend reinstall EiffelStudio in a path with spaces (it took us quite a bit of work to make it work and it is dependent on the gcc toolset you are using, so the latest gcc may have changed its behavior), or to copy the `gcc` folder inside EiffelStudio to a shorter path and then try to compile ffi using our setup. If msys doesn’t work, you can always use Cygwin.

 

Let us know how it goes,

Manu

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Chris Tillman
Sent: Wednesday, May 17, 2017 04:48
To: [hidden email]
Subject: [eiffel-users] MingW version update?

 

Hi,

 

I'm trying to update an application which relied on libffi, from 32-bit to 64-bit. In particular, I'm trying to get the app to compile (freeze) under EiffelStudio 17.01 in Windows 7 64-bit.

 

I tried using downloaded libffi binaries pre-built for 64-bit mingw, but I get messages like "undefined reference to '__chkstk_ms'" in the compilation window. According to what I read about that online, that's due to incompatible versions of gcc between what is being used to compile vs. what was used to build the binary. At the path in the EiffelStudio installation

 

C:\Program Files\Eiffel Software\EiffelStudio 17.01 GPL\gcc\win64\mingw\bin

 

I see the gcc version is

 

$ gcc --version

gcc.exe (GCC) 4.4.5 20100710 (prerelease) [svn/rev.162041 - mingw-w64/oz]

 

And this differs from any downloaded binary, as you might expect, being a 7 years old prerelease version?

 

So I tried to build libffi from source (3.2.1) in the 

 

C:\Program Files\Eiffel Software\EiffelStudio 17.01 GPL\gcc\win64\msys\1.0

 

directory using msys.bat. This gave me problems too. In the extracted source directory, I got space-in-the-path issues from configure. I highlighted the first example in the excerpted output below where that has happened ... line breaks have been inserted into the variable contents.

 

--

$ ./configure --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32

checking build system type... x86_64-w64-mingw32

checking host system type... x86_64-w64-mingw32

...

checking for fgrep... /bin/grep -F

checking for ld used by x86_64-w64-mingw32-gcc... c:/program

files/eiffel

software/eiffelstudio

17.01

gpl/gcc/win64/mingw/x86_64-w64-mingw32/bin/ld.exe

checking if the linker (c:/program

files/eiffel

software/eiffelstudio

17.01

gpl/gcc/win64/mingw/x86_64-w64-mingw32/bin/ld.exe) is GNU ld... no

checking for BSD- or MS-compatible name lister (nm)... \Program Files\Eiffel Software\EiffelStudio 17.01 GPL\gcc\win64\m

ingw\bin/nm

checking the name lister (\Program Files\Eiffel Software\EiffelStudio 17.01 GPL\gcc\win64\mingw\bin/nm) interface... BSD

 nm

checking whether ln -s works... no, using cp -pR

...

config.status: executing src commands

configure: WARNING: cache variable lt_cv_path_LD contains a newline

configure: WARNING: cache variable lt_cv_path_LDCXX contains a newline

--

 

When I try to make using this, I find that configure has built the line-separated path into the Makefiles in each folder, for example here in an excerpt from the main Makefile. 

 

--

INSTALL_STRIP_PROGRAM = $(install_sh) -c -s

LD = c:/program

LDFLAGS = 

...

--

 

Even trying it in the newest version of MingW using gcc 7.1.0 I get similar issues.

 

So going back to the Eiffel path msys.bat prompt, and using

 

$ export PATH="$PATH:/c/Program Files/Eiffel Software/EiffelStudio 17.01 GPL/gcc/win64/mingw/bin"

$ export LD="/c/Program Files/Eiffel Software/EiffelStudio 17.01 GPL/gcc/win64/mingw/bin/ld.exe"

 

... I avoided the path errors. But unfortunately make still comes down to an error after all that.

 

make[3]: Entering directory `/c/Users/user/Downloads/Installers/Mingw-libffi/libffi-3.2.1/x86_64-w64-mingw32'

...

/bin/sh ./libtool  --tag=CC   --mode=link x86_64-w64-mingw32-gcc  -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -march=core2  -Wall -fexceptions   -o libffi_convenience.la  src/prep_cif.lo src/types.lo src/raw_api.lo src/java_raw_api.lo src/closures.lo       src/x86/ffi.lo src/x86/win64.lo

libtool: link: lib -OUT:.libs/libffi_convenience.lib src/.libs/prep_cif.o src/.libs/types.o src/.libs/raw_api.o src/.libs/java_raw_api.o src/.libs/closures.o src/x86/.libs/ffi.o src/x86/.libs/win64.o

./libtool: line 1106: lib: command not found

make[3]: *** [libffi_convenience.la] Error 127

 

 

Will Eiffel be updated to use a newer version of mingw under the covers? It seems like a "during-the-32-to-64-bit transition" version is in use and the newer versions probably have much better 64-bit support.

 

Would that even help? Maybe I need a different approach.

 

--

Chris Tillman
Developer

--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/eiffel-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/eiffel-users.
For more options, visit https://groups.google.com/d/optout.
------------------------------------------------------------------------  
Eiffel Software
805-685-1006
http://www.eiffel.com       
Customer support: http://support.eiffel.com       
User group: http://groups.eiffel.com/join       
------------------------------------------------------------------------