[GRASS-dev] winGRASS 64bit

Hi,

I am hopefully close to winGRASS7 64bit build. Currently I am trying
to solve this issue:

OBJ.x86_64-pc-mingw32/ls_filter.o:ls_filter.c:(.text+0x3e9): undefined
reference to `__imp_regexec'
...
c:/MinGW64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe:
OBJ.x86_64-pc-mingw32/ls_filter.o: bad reloc address 0x0 in section
`.data'
collect2.exe: error: ld returned 1 exit status
make[3]: *** [/osgeo4w/usr/src/grass700/dist.x86_64-pc-mingw32/lib/libgrass_gis.7.0.0.dll]
Error 1

Any kind of hint will be highly appreciated, thanks in advance, Martin

--
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa

Martin Landa wrote:

I am hopefully close to winGRASS7 64bit build. Currently I am trying
to solve this issue:

OBJ.x86_64-pc-mingw32/ls_filter.o:ls_filter.c:(.text+0x3e9): undefined
reference to `__imp_regexec'
...
c:/MinGW64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe:
OBJ.x86_64-pc-mingw32/ls_filter.o: bad reloc address 0x0 in section
`.data'
collect2.exe: error: ld returned 1 exit status
make[3]: *** [/osgeo4w/usr/src/grass700/dist.x86_64-pc-mingw32/lib/libgrass_gis.7.0.0.dll]
Error 1

Any kind of hint will be highly appreciated, thanks in advance, Martin

"undefined reference to __imp_xxxx" usually means that it found the
import library but not the corresponding DLL.

Or maybe it's finding a 32-bit version?

MSVCRT doesn't have the <regex.h> functions; MinGW uses a port of the
regex functionality from GNU libc.

--
Glynn Clements <glynn@gclements.plus.com>

Hi,

2015-02-26 1:40 GMT+01:00 Glynn Clements <glynn@gclements.plus.com>:

"undefined reference to __imp_xxxx" usually means that it found the
import library but not the corresponding DLL.

right, it seems to be this case. Thanks for hint, Martin

--
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa

Hi,

2015-02-27 21:01 GMT+01:00 Martin Landa <landa.martin@gmail.com>:

2015-02-26 1:40 GMT+01:00 Glynn Clements <glynn@gclements.plus.com>:

"undefined reference to __imp_xxxx" usually means that it found the
import library but not the corresponding DLL.

right, it seems to be this case. Thanks for hint, Martin

regex-devel contains just a static library. Is it possible to solve
compilation issue somehow or do I need DLL lib?

Thanks, Martin

--
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa

Martin Landa wrote:

> 2015-02-26 1:40 GMT+01:00 Glynn Clements <glynn@gclements.plus.com>:
>> "undefined reference to __imp_xxxx" usually means that it found the
>> import library but not the corresponding DLL.
>
> right, it seems to be this case. Thanks for hint, Martin

regex-devel contains just a static library. Is it possible to solve
compilation issue somehow or do I need DLL lib?

If they're following the same naming conventions as Linux
distributions, there should be a corresponding "regex" package
containing the DLL.

Running software which uses the regex functions would only need the
"regex" package, while compiling it would need both the "regex" and
"regex-devel" packages.

--
Glynn Clements <glynn@gclements.plus.com>

Hi Martin,

On Sat, 28. Feb 2015 at 09:21:59 +0100, Martin Landa wrote:

> Because it's a static library.

yes, so it's seems to me that there is missing corresponding "regex"
package, right?

No, it's built as a static library, hence there is no DLL and therefore there's
no need for a "regex" package, because there's nothing left it could contain.

But feel free to rebuild the package as a dynamic library if you want - it's
only used by GRASS anyway.

Jürgen

--
Jürgen E. Fischer norBIT GmbH Tel. +49-4931-918175-31
Dipl.-Inf. (FH) Rheinstraße 13 Fax. +49-4931-918175-50
Software Engineer D-26506 Norden http://www.norbit.de
QGIS release manager (PSC) Germany IRC: jef on FreeNode

Jürgen E. Fischer wrote:

> > Because it's a static library.

> yes, so it's seems to me that there is missing corresponding "regex"
> package, right?

No, it's built as a static library, hence there is no DLL and therefore there's
no need for a "regex" package, because there's nothing left it could contain.

It may be that Martin is using a different regex library (MinGW has
its own version, although it's not part of the base package).

I think this can also happen if the function is declared with
__declspec(dllimport) (which would suggest either using the wrong
version of <regex.h> or a need for a -D switch or #define).

AIUI, __declspec(dllimport) instructs the compiler to compile calls to
the function as an indirect function call, taking the address from the
__imp_* symbol in the program's import table. Import libraries provide
a normal function which just performs the indirect call.

--
Glynn Clements <glynn@gclements.plus.com>