jtouug / freehal

Automatically exported from code.google.com/p/freehal
0 stars 0 forks source link

Make hal2012-server-thread on Linux fails #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
./configure && make hal2012-server hal2012-server-thread

What is the expected output? What do you see instead?
[100%] Built target hal2012-server
[  3%] Building CXX object 
CMakeFiles/hal2012-server-thread.dir/hal2012-startup.cpp.o
[  7%] Building CXX object 
CMakeFiles/hal2012-server-thread.dir/hal2012-server-thread.cpp.o
/home/jan/freehal/hal2012/hal2012-server-thread.cpp: In function ‘void* 
hal2012_handle_signal(void*)’:
/home/janfreehal/hal2012/hal2012-server-thread.cpp:690:9: error: 
‘parsed_type’ is not a member of ‘grammar2012’
/home/jan/freehal/hal2012/hal2012-server-thread.cpp:690:35: error: ‘parsed’ 
was not declared in this scope
make[3]: *** [CMakeFiles/hal2012-server-thread.dir/hal2012-server-thread.cpp.o] 
Error 1
make[2]: *** [CMakeFiles/hal2012-server-thread.dir/all] Error 2
make[1]: *** [CMakeFiles/hal2012-server-thread.dir/rule] Error 2
make: *** [hal2012-server-thread] Error 2

What version of the product are you using? On what operating system?
Ubuntu Linux 12.04 LTS

Original issue reported on code.google.com by JanDillm...@gmail.com on 9 Aug 2012 at 11:27

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
You must be using the 12.04 amd64 version of precise ? Are you not ? I am 
getting the same error on the latter !

Original comment by websecur...@gmail.com on 26 Aug 2012 at 5:29

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
OK. The problem is here:

In file hal2012-server-thread.cpp, line 690, it says parsed_type instead of 
parsed_t

Original comment by sambucus...@gmail.com on 27 Aug 2012 at 10:08

GoogleCodeExporter commented 9 years ago
This is what happens now ... :(

make
[ 24%] Built target hal2012-server
Linking CXX executable hal2012-server-thread
CMakeFiles/hal2012-server-thread.dir/hal2012-parser2012.cpp.o: In function 
`grammar2012::sentence::parse()':
/home/marko/HAL/freehal-read-only/hal2012/hal2012-parser2012.cpp:127: undefined 
reference to `grammar2012::halxml_ordertags(std::basic_string<char, 
std::char_traits<char>, std::allocator<char> >&, std::basic_string<char, 
std::char_traits<char>, std::allocator<char> >&)'
/home/marko/HAL/freehal-read-only/hal2012/hal2012-parser2012.cpp:135: undefined 
reference to 
`grammar2012::halxml_readxml_fact(std::vector<std::basic_string<char, 
std::char_traits<char>, std::allocator<char> >, 
std::allocator<std::basic_string<char, std::char_traits<char>, 
std::allocator<char> > > >&, int&)'
/home/marko/HAL/freehal-read-only/hal2012/hal2012-parser2012.cpp:136: undefined 
reference to `grammar2012::xml_obj::trim()'
/home/marko/HAL/freehal-read-only/hal2012/hal2012-parser2012.cpp:137: undefined 
reference to `grammar2012::xml_obj::prepare_tags(grammar2012::tagger*)'
collect2: ld returned 1 exit status
make[2]: *** [hal2012-server-thread] Error 1
make[1]: *** [CMakeFiles/hal2012-server-thread.dir/all] Error 2
make: *** [all] Error 2

Original comment by sambucus...@gmail.com on 27 Aug 2012 at 11:13

GoogleCodeExporter commented 9 years ago
Ubuntu 12.04.1 LTS - 3.2.0-30-generic - x86_64

same problem as OP. 
following sambucus suggestion got me to the linking stage.

looks like it's also missing -lboost_filesystem(-mt) during linking (on my 
system at least)
after adding that to the linker flags I now have the very same situation as 
sambucus above.

hth

Original comment by kishalmi@gmail.com on 28 Aug 2012 at 9:02

GoogleCodeExporter commented 9 years ago
Hi.

You're right, I forgot to mention that.

So I've been successful at moving forward...

The required functions should be acquired from hal2012-xml2012.o not just 
hal2012-xml.o so, I had to modify Makefile in hal2012 folder to make procedures 
to create hal2012-xml2012.cpp.o, and then include it to the linker ...

Success :)

Here are the files I modified:

Makefile is from hal2012 folder, the rest are from 
hal2012/CMakeFiles/hal2012-server-thread.dir/

Original comment by sambucus...@gmail.com on 29 Aug 2012 at 9:35

Attachments:

GoogleCodeExporter commented 9 years ago
very nice find sambucus!

took a slightly different route like directly compiling hal2012-xml2012.cpp.o

/usr/bin/c++    -I. -I/compiler/local/linux/include 
-I/compiler/local/all/include -pg -g -o 
CMakeFiles/hal2012-server-thread.dir/hal2012-xml2012.cpp.o -c 
hal2012-xml2012.cpp

and adding it to the links.

anyways, I believe that neither way is the proper cmake one,
 but the information gathered here should be sufficient to fix the issue :)

* fix parsed_type* -> parsed_t*
* hal2012-xml -> hal2012-xml2012 + link it
* add libboost_filesystem dependecies to linking flags

hth

Original comment by kishalmi@gmail.com on 31 Aug 2012 at 10:45