Errors while doing 'make' on MinGW/minsys

708 views
Skip to first unread message

Brovar

unread,
Mar 23, 2010, 9:02:59 PM3/23/10
to link-grammar
Hello!

I'm a college student and I really need to use link-grammar parser in
my java project. I'm trying to do this in MinGW/minsys environment on
either Windows XP 32 bit or Windows 7 64bit. I've followed readme
instructions about installing mingw/minsys closely. So far, I've
managed to get past ./configure with the 4.6.6 version without any
errors (had to remove -lc attribute from configure and configure.in
files to get past regex checking).

Now, I've encountered a problem I'm unable to solve by myself. When I
issue the 'make' command it starts compiling, does it for quite a
while and then stops, displaying the following error:

<i>
link-parser.c:46:21: termios.h: No such file or directory
link-parser.c:47:23: sys/ioctl.h: No such file or directory
link-parser.c: In function `check_winsize':
link-parser.c:480: error: storage size of 'ws' isn't known
link-parser.c:483: error: implicit declaration of function `ioctl'
link-parser.c:483: warning: nested extern declaration of `ioctl'
link-parser.c:483: error: `TIOCGWINSZ' undeclared (first use in this
function)
link-parser.c:483: error: (Each undeclared identifier is reported only
once
link-parser.c:483: error: for each function it appears in.)
link-parser.c:480: warning: unused variable `ws'
make[2]: *** [link-parser.o] Error 1
make[2]: Leaving directory `/home/Browar/link-grammar-4.6.6/link-
grammar'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/Browar/link-grammar-4.6.6/link-
grammar'
make: *** [all-recursive] Error 1
</i>

Where should I look for termios.h and ioctl.h? I think I know where to
put them when I find them :)

Please help me with this problem, I can't move forward with my work
until I get link-grammar working in my java project.

Thanks in advance
Brovar

Brovar

unread,
Mar 24, 2010, 7:59:26 PM3/24/10
to link-grammar
Hi again!

Actually, nevermind what I asked before, I managed to get past that
problem. I even managed to complete the 'make' succesfully, it even
made the linkgrammar-4.6.6.jar for me. According to the readme, I'm
now supposed to create the .dlls. And I encounter another problem
there:

.libs/and.o: In function `free_AND_tables':
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/and.c:328:
undefined reference to `free_disjuncts'
.libs/and.o: In function `put_disjunct_into_table':
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/and.c:637:
undefined reference to `copy_disjunct'
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/and.c:610:
undefined reference to `copy_disjunct'
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/and.c:540:
undefined reference to `copy_disjunct'
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/and.c:632:
undefined reference to `free_disjuncts'
.libs/and.o: In function `build_fat_link_substitutions':
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/and.c:875:
undefined reference to `copy_disjunct'
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/and.c:881:
undefined reference to `copy_disjunct'
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/and.c:899:
undefined reference to `copy_disjunct'
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/and.c:905:
undefined reference to `copy_disjunct'
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/and.c:923:
undefined reference to `copy_disjunct'
.libs/and.o:C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/
and.c:929: more undefined references to `copy_disjunct' follow
.libs/and.o: In function `explode_disjunct_list':
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/and.c:951:
undefined reference to `catenate_disjuncts'
.libs/and.o: In function `build_COMMA_disjunct_list':
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/and.c:990:
undefined reference to `copy_disjunct'
.libs/and.o: In function `build_AND_disjunct_list':
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/and.c:1016:
undefined reference to `copy_disjunct'
.libs/api.o: In function `dictionary_six':
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/api.c:621:
undefined reference to `read_regex_file'
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/api.c:623:
undefined reference to `compile_regexs'
.libs/api.o: In function `dictionary_delete':
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/api.c:760:
undefined reference to `free_regexs'
.libs/api.o: In function `linkage_get_disjunct_str':
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/api.c:1627:
undefined reference to `lg_compute_disjunct_strings'
.libs/build-disjuncts.o: In function `build_sentence_disjuncts':
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/build-
disjuncts.c:484: undefined reference to `catenate_disjuncts'
.libs/count.o: In function `delete_unmarked_disjuncts':
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/count.c:759:
undefined reference to `free_disjuncts'
.libs/massage.o: In function `glom_aux_connector':
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/massage.c:123:
undefined reference to `catenate_disjuncts'
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/massage.c:105:
undefined reference to `copy_disjunct'
.libs/massage.o: In function `install_special_conjunctive_connectors':
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/massage.c:224:
undefined reference to `catenate_disjuncts'
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/massage.c:254:
undefined reference to `catenate_disjuncts'
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/massage.c:275:
undefined reference to `catenate_disjuncts'
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/massage.c:279:
undefined reference to `catenate_disjuncts'
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/massage.c:284:
undefined reference to `catenate_disjuncts'
.libs/massage.o:C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-
grammar/massage.c:314: more undefined references to
`catenate_disjuncts' follow
.libs/massage.o: In function `install_special_conjunctive_connectors':
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/massage.c:71:
undefined reference to `copy_disjunct'
.libs/preparation.o: In function `install_fat_connectors':
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/preparation.c:
225: undefined reference to `catenate_disjuncts'
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/preparation.c:
222: undefined reference to `catenate_disjuncts'
.libs/preparation.o: In function `free_sentence_disjuncts':
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/preparation.c:
297: undefined reference to `free_disjuncts'
.libs/preparation.o: In function `prepare_to_parse':
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/preparation.c:
320: undefined reference to `eliminate_duplicate_disjuncts'
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/preparation.c:
375: undefined reference to `eliminate_duplicate_disjuncts'
.libs/prune.o: In function `power_prune':
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/prune.c:1167:
undefined reference to `free_disjuncts'
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/prune.c:1509:
undefined reference to `free_disjuncts'
.libs/read-dict.o: In function `dict_display_word_info':
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/read-dict.c:
1746: undefined reference to `free_disjuncts'
.libs/tokenize.o: In function `is_entity':
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/tokenize.c:60:
undefined reference to `match_regex'
.libs/tokenize.o: In function `boolean_reg_dict_lookup':
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/tokenize.c:
258: undefined reference to `match_regex'
.libs/tokenize.o: In function `build_sentence_expressions':
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/tokenize.c:
883: undefined reference to `match_regex'
.libs/word-utils.o: In function `word_has_connector':
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/word-utils.c:
445: undefined reference to `free_disjuncts'
C:/msys/1.0/home/Browar/link-grammar-4.6.6/link-grammar/word-utils.c:
450: undefined reference to `free_disjuncts'
collect2: ld returned 1 exit status

I have literally no idea what to do now :)

I also tried to make the files using visual studio, but no luck with
that either.

Please help,

Thanks in advance
Brovar

Brovar

unread,
Mar 24, 2010, 9:10:33 PM3/24/10
to link-grammar
Actually, nevermind what I asked before for now... There is an error
while doing 'make install'...

/bin/install -c .libs/liblink-grammar.dll.a /usr/local/lib
/bin/install: cannot stat `.libs/liblink-grammar.dll.a': No such file
or directo
ry
make[3]: *** [install-libtool-import-lib] Error 1
make[3]: Leaving directory `/home/Browar/link-grammar-4.6.6/link-
grammar'
make[2]: *** [install-am] Error 2


make[2]: Leaving directory `/home/Browar/link-grammar-4.6.6/link-
grammar'

make[1]: *** [install-recursive] Error 1


make[1]: Leaving directory `/home/Browar/link-grammar-4.6.6/link-
grammar'

make: *** [install-recursive] Error 1

Can't find liblink-grammar.dll.a ... where am I supposed to get it
from?

Brovar

Brovar

unread,
Mar 24, 2010, 10:11:58 PM3/24/10
to link-grammar
Or actually... don't mind anything I said before ;] I managed to
configure, make and install link-grammar at last! I even got the Java
bindings, and they seem to work (more or less)... now... is there any
tutorial about using them to actually parse senteces out there?

Brovar

frostshoxx

unread,
Mar 24, 2010, 10:40:45 PM3/24/10
to link-grammar
Hi Brovar,

Congratulation on getting this to work.
Anyway, if you don't mind, would you please list the steps of how you
get this to work? Did you end up compiling it on Visual Studio?

Thank you,

Patt

Brovar

unread,
Mar 25, 2010, 5:25:48 AM3/25/10
to link-grammar
Hi Patt,

Sure, here's what I did (I'm running windows xp 32bit atm):
1. I installed MinGW (default path)
2. I installed minsys (default settings)
3. I downloaded minsysdvlpr, not extracted it yet though.
4. I downloaded regex from the address from the Link-Grammar readme,
installed it and copied its contents over my mingw installation.
5. I edited configure and configure.in files in LinkGrammar directory,
removing -lc from the
LDFLAGS="${LDFLAGS} -L/usr/lib/mingw -lmingwex -lcrtdll -
lmsvcrt -lc -Wl,--allow-multiple-definition",
line.
6. After this, the ./configure completed no problems.
7. Then I opened minsysdvlpr and copied include/termios.h, include/
sys.ioctl.h and include/sys/termios.h from it to my minGW include
directory.
7. Then I had to modify link-parser.c file in link-grammar/ directory,
because it failed to compile. There is a static void
check_winsize(Parse_Options popts) method causing problems with ioctl.
Just as the comment above it says - its designed to work in Linux, but
it causes problems in windows. Its probably possible to re-write it to
work in windows, but I went the easy way and removed most of the
method, just assuming that standard console window width is 80
columns, so I deleted most of the method, leaving only one line:

static void check_winsize(Parse_Options popts)
{
#ifndef _MSC_VER
{
parse_options_set_screen_width(popts, 79);
}
#endif /* _MSC_VER */
}

8. That made my 'make' work ok.
9. Then I went inside the generated link-grammar directory and edited
makefile in there. Problem is, it was looking for liblink-
grammar.dll.a file, which I couldn't find. Its near the end of the
file. Without thinking much, I changed it from liblink.grammar.dll.a
to liblink.grammar.a :P
10. Then I edited the makefile in the main link-grammar directory,
because it was trying to move the .jar file it generated into //usr/
(...) folder, which is obviously a typo, so I modified it to /usr/
(...).
11. That made it install ok.
12. Then I downloaded the .dlls from a link mr Borislav Iordanov
kindly provided some time ago in this group: http://www.kobrix.com/index.jsp
and I've put them all in msys's local/bin folder.
13. Then I just included the .jar provided in my eclipse project.

Hope this helps.

Thing is though... I'm not sure how to make it do anything. I can do
LinkGrammar.parse(String), I can set path to dictionary, I can get the
version numbers, but whenever I try to actually make it do something
by accessing linkages or stuff, I just get .dll errors. Is it because
I used mr Iordanovs dlls, and they're from a different version? Or am
I not using it correctly? Please help, I really need to start using it
in my java project...

Thanks in advance,
Brovar

Brovar

unread,
Mar 25, 2010, 6:09:14 AM3/25/10
to link-grammar
Ok... so here's the deal: even though I have it installed, it doesn't
seem to work. If I try doing something in Java, except
of .init(), .setDictionariesPath(), and .parse(), I get:

#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x10008846, pid=2596,
tid=2620
#
# JRE version: 6.0_18-b07
# Java VM: Java HotSpot(TM) Client VM (16.0-b13 mixed mode, sharing
windows-x86 )
# Problematic frame:
# C [link-grammar.dll+0x8846]
#
# An error report file with more information is saved as:
# C:\Documents and Settings\Browar\Desktop\Eclipse Projects\WNtst
\hs_err_pid2596.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

And if I try running link-parser.exe from the command line I get:

link-parser.exe: Warning: locale was not UTF-8; force-setting to
en_US.UTF-8
link-grammar: Info: Dictionary found at C:/msys/1.0/local/share/link-
grammar\en\
4.0.dict
link-grammar: Error opening word file en/words/entities.given-
bisex.sing
link-grammar: Error opening word file /en/words/entities.given-
bisex.sing
link-parser.exe: Fatal error: Unable to open dictionary.

Please help the poor student, almighty C-men :)

Regards
Brovar

Borislav Iordanov

unread,
Mar 25, 2010, 1:44:33 PM3/25/10
to link-g...@googlegroups.com
Looks like both errors are due to the fact that it can't find the
dictionaries. Missing dictionaries do cause a core dump from Java....

> --
> You received this message because you are subscribed to the Google Groups "link-grammar" group.
> To post to this group, send email to link-g...@googlegroups.com.
> To unsubscribe from this group, send email to link-grammar...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/link-grammar?hl=en.
>
>

--
http://www.kobrix.com - HGDB graph database, Java Scripting IDE, NLP
http://kobrix.blogspot.com - news and rants

"Frozen brains tell no tales."

-- Buckethead

Bartosz Browarski

unread,
Mar 25, 2010, 7:28:25 PM3/25/10
to link-g...@googlegroups.com
Sorry for spamming, but I just thought of something... I think there is a possibility that its an encoding problem. When I run something link-grammar related in java, I get:

Warning: The word "â€" found near line 4691 of en\4.0.dict matches the following words:
â€
This word will be ignored.
Warning: The word "â€" found near line 4691 of en\4.0.dict matches the following words:
â€
This word will be ignored.
Warning: The word "â€" found near line 21 of en\4.0.affix matches the following words:
â€
This word will be ignored.
Warning: The word "â€" found near line 21 of en\4.0.affix matches the following words:
â€
This word will be ignored.

And when I try running link-parser.exe from the command line, I get link-parser.exe: Warning: locale  was not UTF-8; force-setting to en_US.UTF-8

Sooooo... (this is a longshot - I'm not sure what I'm talking about) wouldn't it be possible to set mingw/msys to use en_US.UTF-8 all the time and rebuild all the files (including dictionaries) using it? How would I do that? Is it making any sense at all?

I know I'm asking a lot of questions, but I've been struggling with it for the past 3 weeks and I'm really running out of time to make it work. 

Brovar

2010/3/25 Bartosz Browarski <bartosz....@gmail.com>
Thanks for your reply. I'm glad its one problem occuring in two places and not two different problems ;)

What do you suggest I do about it? The dictionaries are available and installed. 
Do you think its because of the weird path? 

I mean, that part of the path uses "/" and the other one uses "\"?
link-grammar: Info: Dictionary found at C:/msys/1.0/local/share/link-grammar\en\4.0.dict

How can I change the path where link-grammar looks for the dictionaries?

The file it asks about, "entities.given-bisex.sing", is only 2.79KB in size on my system, is that ok? 

I tried rebuilding it all, but no change.

Please help,
Brovar

2010/3/25 Borislav Iordanov <borislav...@gmail.com>

Bartosz Browarski

unread,
Mar 25, 2010, 6:38:14 PM3/25/10
to link-g...@googlegroups.com
Thanks for your reply. I'm glad its one problem occuring in two places and not two different problems ;)

What do you suggest I do about it? The dictionaries are available and installed. 
Do you think its because of the weird path? 

I mean, that part of the path uses "/" and the other one uses "\"?
link-grammar: Info: Dictionary found at C:/msys/1.0/local/share/link-grammar\en\4.0.dict

How can I change the path where link-grammar looks for the dictionaries?

The file it asks about, "entities.given-bisex.sing", is only 2.79KB in size on my system, is that ok? 

I tried rebuilding it all, but no change.

Please help,
Brovar

2010/3/25 Borislav Iordanov <borislav...@gmail.com>
Looks like both errors are due to the fact that it can't find the

Linas Vepstas

unread,
Mar 25, 2010, 9:32:09 PM3/25/10
to link-g...@googlegroups.com
On 25 March 2010 17:28, Bartosz Browarski <bartosz....@gmail.com> wrote:
Sorry for spamming, but I just thought of something... I think there is a possibility that its an encoding problem. When I run something link-grammar related in java, I get:

Warning: The word "â€" found near line 4691 of en\4.0.dict matches the following words:
â€
This word will be ignored.
Warning: The word "â€" found near line 4691 of en\4.0.dict matches the following words:
â€
This word will be ignored.
Warning: The word "â€" found near line 21 of en\4.0.affix matches the following words:
â€
This word will be ignored.
Warning: The word "â€" found near line 21 of en\4.0.affix matches the following words:
â€
This word will be ignored.

And when I try running link-parser.exe from the command line, I get link-parser.exe: Warning: locale  was not UTF-8; force-setting to en_US.UTF-8


Yes, one gets the above errors if the locale is not UTF8
 
Sooooo... (this is a longshot - I'm not sure what I'm talking about) wouldn't it be possible to set mingw/msys to use en_US.UTF-8 all the time

Yes it should be
 
and rebuild all the files (including dictionaries) using it?

There is no need to rebuild. The locale is a run-time setting in the operating system.

How would I do that?

You'd have to ask a windows expert.

--linas

Linas Vepstas

unread,
Mar 25, 2010, 9:37:11 PM3/25/10
to link-g...@googlegroups.com
On 25 March 2010 16:38, Bartosz Browarski <bartosz....@gmail.com> wrote:
Thanks for your reply. I'm glad its one problem occuring in two places and not two different problems ;)

What do you suggest I do about it? The dictionaries are available and installed. 
Do you think its because of the weird path? 

I mean, that part of the path uses "/" and the other one uses "\"?
link-grammar: Info: Dictionary found at C:/msys/1.0/local/share/link-grammar\en\4.0.dict

yes, maybe all those different slashes are confusing it.  Maybe
Here's a long-shot: try editing utilities.c and changing  DIR_SEPARATOR to be forward slash
and then recompiling. But that's just a wild guess...

How can I change the path where link-grammar looks for the dictionaries?

The file it asks about, "entities.given-bisex.sing", is only 2.79KB in size on my system, is that ok? 

Yes. that's about the right size.
 
--linas

Linas Vepstas

unread,
Mar 25, 2010, 10:36:58 PM3/25/10
to link-g...@googlegroups.com
On 25 March 2010 03:25, Brovar <bartosz....@gmail.com> wrote:
> Hi Patt,
>
> Sure, here's what I did (I'm running windows xp 32bit atm):
> 1. I installed MinGW (default path)
> 2. I installed minsys (default settings)

I think the core problem here, as I understand it, is that mingw is
intended to compile *windows* applications for windows (using
the gnu toolset), and not unix applications for windows. Thus, it
doesn't cleanly handle the issues that the unix world takes for granted.
My understanding is that cygwin is the correct choice for compiling
unix apps on windows. Or at least, that's what I've been told.

Certainly, this would explain the assortment of troubles with the
dll's and makefiles and so on.

--linas

Linas Vepstas

unread,
Mar 25, 2010, 11:30:01 PM3/25/10
to Borislav Iordanov, link-g...@googlegroups.com
Hi Boris,

Can you help me with the below? A very quick skim of the main
google hits for mingw and cygwin very quickly indicates that
mingw is intended for compiling *windows* programs while
cygwin is intended for compiling linux programs on windows.

So I was about to change the link-grammar readme to recommend
cygwin, not mingw, when it suddenly struck me that maybe this will
negatively affect the Java bindings. .. so, in your dll's did you
build against mingw, or cygwin ?

--linas

David Hart

unread,
Mar 25, 2010, 11:38:44 PM3/25/10
to link-g...@googlegroups.com, link-g...@googlegroups.com
Thanks for that insight. I never really understood the distinction
between them before.

Dave

David Hart | phone +61 419 483 263 | sent from iPhone

Borislav Iordanov

unread,
Mar 26, 2010, 7:26:39 AM3/26/10
to linasv...@gmail.com, link-g...@googlegroups.com
Hi Linas,

I didn't follow the discussion very carefully and I haven't followed
the latest link-grammar updates, otherwise I would have tried to help
more. I used to build with MS VC++. Cygwin didn't work and actually
Murilo had found mingw because cygwin failed and/or because cygwin
requires an extra runtime DLL to run. My understanding is that mingw
is a simplified, cleaner toolset, lighter weight, perhaps missing some
features, which is probably what makes it for "windows" rather for
"unix" apps. But link grammar should build with mingw as it doesn't
have many (if any) dependencies on a unix env, which is what cygwin
provides with its runtime dll.

Now that I re-read Brovar's email more carefully, he's trying to run
my MSVC++ DLLs from an older version of LG with an executable built
with mingw of the newer version and newer jar....bad idea :)

I remember seeing those encoding warnings and I don't believe they are
problematic. I don't think they would cause a crash. More likely, it's
about missing dictionary files.

I'll try to find some time this week-end to research this.

Boris

--

Murilo Saraiva de Queiroz

unread,
Mar 26, 2010, 9:39:04 AM3/26/10
to link-g...@googlegroups.com, linasv...@gmail.com
The problem with Cygwin is the Java bindings. I wasn't able to call a DLL generated by Cygwin using JNI (Java Native Interface). See a more detailed explanation here: 

Since it was much simpler to compile it using MinGW/MSYS, we decided to use it. 

--
You received this message because you are subscribed to the Google Groups "link-grammar" group.
To post to this group, send email to link-g...@googlegroups.com.
To unsubscribe from this group, send email to link-grammar...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/link-grammar?hl=en.




--
Murilo Saraiva de Queiroz, MSc.
Senior Software Engineer  
http://www.vettalabs.com
http://www.tecnologiainteligente.com.br
http://www.acalantoemcasa.com.br

Linas Vepstas

unread,
Mar 26, 2010, 10:21:46 AM3/26/10
to Borislav Iordanov, link-g...@googlegroups.com
On 26 March 2010 05:26, Borislav Iordanov <borislav...@gmail.com> wrote:
Hi Linas,

I'll try to find some time this week-end to research this.

OK, thanks, not needed; you've already clarified. FWIW the mingw website is explicit
about what its for: its for compiling *windows* applications using the gnu toolset.  The
cygwin website is equally clear: it provides a linux compatibility layer for windows.
So, indeed, two very distinct things.   And Murilo answered my java jni question,
(thanks murilo).

--linas 

Simon Stuart

unread,
Mar 26, 2010, 1:31:52 PM3/26/10
to link-g...@googlegroups.com

Mr Lordanov,

Since you've successfully managed to build the LGP binaries in MSVC++, I don't suppose you could give me a walkthrough on how to get past the annoying "strings.h" issue? Or better yet, could you perhaps provide compiled binaries for the latest SVN of the source? I'm building a wrapper unit for my friend Rich Cooper (an active member of this group) for his project, and I just can't get the damn binaries to build! MinGW gives me more problems when compiling than MSVC++ so there's just no point in me persuing that method... and Cygwin's "Make" system is being overriden by Borland C++ 6.2 (2010) and I don't want to have to completely change my environment settings and risk breaking BC++ (which I use all the time).

Would it be possible for you to produce an automated "Makefile" for MSVC++ Command Prompt even?

I've Google'd my problem for over 9 hours now and all I've found is that Strings.h is a UNIX C source and is not available on Windows. I read a message where someone replaced the Strings.h include line in the source with the Regex.h unit (which I've tried) but that also gives me linker issues during the build.

I believe that all I need are the following binaries:

liblink-grammar-4.dll
link-grammar.dll
link-parser.exe

This project doesn't need the Java bindings since I'll be producing a full binding for Pascal so that Mr. Cooper can natively interact with the LGP engine without having to use the somewhat-hacky method of piping the command-line tool.

I appreciate any assistance or advice you can provide.

Kind regards,

Simon J Stuart


------Original Mail------
From: "Borislav Iordanov" <borislav...@gmail.com>
To: <linasv...@gmail.com>,
<link-g...@googlegroups.com>
Sent: Fri, 26 Mar 2010 07:26:39 -0400
Subject: Re: [Link Grammar] Re: Errors while doing 'make' on MinGW/minsys

--
You received this message because you are subscribed to the Google Groups "link-grammar" group.
To post to this group, send email to link-g...@googlegroups.com.
To unsubscribe from this group, send email to link-grammar...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/link-grammar?hl=en.



____________________________________________________________________________
E-Mail scanned by Kaspersky Antivirus (Up To Date)

Bartosz Browarski

unread,
Mar 26, 2010, 1:55:45 PM3/26/10
to link-g...@googlegroups.com
First of all, thanks for all the replies. I'm really starting to understand the complexity of whats done here. 

I've tried changing the path separator as Linas suggested, but it changed nothing. Then I simply moved the dictionary from C:\msys\1.0\local\share\link-grammar\en to C:\msys\1.0\local\bin\en, and I no longer get the message about missing files. Now, on the other hand, I get info about unknown character set:

C:\msys\1.0\local\bin>link-parser.exe
link-parser.exe: Warning: locale  was not UTF-8; force-setting to en_US.UTF-8
link-grammar: Info: Dictionary found at .\en\4.0.dict
link-grammar: Fatal Error: unknown character set

It also happens when I try to force it into UTF-8, which, as I've googled, is done in Windows console by issuing the  followed command: 

C:\msys\1.0\local\bin>chcp 65001 && link-parser.exe

Unfortunately, that didn't change anything. Will try to keep looking ;], please keep posting suggestions...

Regards,
Brov

Bartosz Browarski

unread,
Mar 26, 2010, 1:59:09 PM3/26/10
to link-g...@googlegroups.com
I'd apprecieate that, as well, because it really was silly of me to just group a new .jar and old .dlls together and hope for them to work... 

I've tried building the dlls with MSVC++, but I get the same error I get when i try to use gcc for it (as explained in the readme). Its just a lot of errors similar to this:

read-dict.obj : error LNK2019: unresolved external symbol _free_disjuncts referenced in function _linkgrammar_get_dict_version
word-utils.obj : error LNK2001: unresolved external symbol _free_disjuncts
and.obj : error LNK2001: unresolved external symbol _free_disjuncts
count.obj : error LNK2001: unresolved external symbol _free_disjuncts
preparation.obj : error LNK2001: unresolved external symbol _free_disjuncts
(...)

Any help as to get past this (to get my own dlls), or a set of already compiled and working dlls that go together with current .jar would be a great help for me.

Thanks in Advance
Brov

2010/3/26 Simon Stuart <kra...@greycascade.com>

Borislav Iordanov

unread,
Mar 27, 2010, 1:11:05 PM3/27/10
to link-g...@googlegroups.com
Hi,

See my recent email and project files. strings.h can simply be
commented out - the depedencies were already removed, but the include
hasn't be #ifdef-ed yet. Do you still need the DLLs? Perhaps it's
better for you to be able to compile with MSVC++....perhaps you would
want to link regex.lib statically to reduce the deployment hassle of
multiple DLLs...

Best,
Boris

Reply all
Reply to author
Forward
0 new messages