Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Compile fail on Ubuntu 11.04

Compile fail on Ubuntu 11.04 12 years 9 months ago #2482

  • shahzad
  • shahzad's Avatar
I am trying to compile Proview 4.8.2 on a Ubuntu 11.04 system, but it fails. I am following the pdf file provided and build-howto in the source zip.
It seems like an issue with \"ANTLR\" , I have installed antlr using

> apt-get install antlr

I have also downloaded src for antlr and compiled it with its Ant build script which resulted in a jar file, but don't know what to do with it.
Anyway, I hope someone here would know more about it, here is the output where it fails:


<code>[code:1]
/home/sk/Projects/pwrsrc_4.8.2-1/rls_dbg/os_linux/hw_x86/exp/lib/libpwr_wb.a(wb_erep.o): In function `~RecognitionException':
/usr/include/antlr/RecognitionException.hpp:28: undefined reference to `vtable for antlr::RecognitionException'
/home/sk/Projects/pwrsrc_4.8.2-1/rls_dbg/os_linux/hw_x86/exp/lib/libpwr_wb.a(wb_erep.o): In function `~MismatchedCharException':
/usr/include/antlr/MismatchedCharException.hpp:90: undefined reference to `vtable for antlr::MismatchedCharException'
/usr/include/antlr/MismatchedCharException.hpp:90: undefined reference to `antlr::BitSet::~BitSet()'
/home/sk/Projects/pwrsrc_4.8.2-1/rls_dbg/os_linux/hw_x86/exp/lib/libpwr_wb.a(wb_erep.o): In function `antlr::CharScanner::consumeUntil(antlr::BitSet const&«»)':
/usr/include/antlr/CharScanner.hpp:178: undefined reference to `antlr::BitSet::member(unsigned int) const'
/home/sk/Projects/pwrsrc_4.8.2-1/rls_dbg/os_linux/hw_x86/exp/lib/libpwr_wb.a(wb_erep.o): In function `antlr::CharScanner::match(int)':
/usr/include/antlr/CharScanner.hpp:200: undefined reference to `antlr::MismatchedCharException::MismatchedCharException(int, int, bool, antlr::CharScanner*)'
/usr/include/antlr/CharScanner.hpp:200: undefined reference to `typeinfo for antlr::MismatchedCharException'
/home/sk/Projects/pwrsrc_4.8.2-1/rls_dbg/os_linux/hw_x86/exp/lib/libpwr_wb.a(wb_erep.o): In function `antlr::CharScanner::match(antlr::BitSet const&«»)':
/usr/include/antlr/CharScanner.hpp:211: undefined reference to `antlr::BitSet::member(unsigned int) const'
/usr/include/antlr/CharScanner.hpp:212: undefined reference to `antlr::MismatchedCharException::MismatchedCharException(int, antlr::BitSet, bool, antlr::CharScanner*)'
/usr/include/antlr/CharScanner.hpp:212: undefined reference to `antlr::BitSet::~BitSet()'
/usr/include/antlr/CharScanner.hpp:212: undefined reference to `typeinfo for antlr::MismatchedCharException'
/usr/include/antlr/CharScanner.hpp:212: undefined reference to `antlr::BitSet::~BitSet()'
/home/sk/Projects/pwrsrc_4.8.2-1/rls_dbg/os_linux/hw_x86/exp/lib/libpwr_wb.a(wb_erep.o): In function `antlr::CharScanner::match(char const*)':
/usr/include/antlr/CharScanner.hpp:227: undefined reference to `antlr::MismatchedCharException::MismatchedCharException(int, int, bool, antlr::CharScanner*)'
/usr/include/antlr/CharScanner.hpp:227: undefined reference to `typeinfo for antlr::MismatchedCharException'
/home/sk/Projects/pwrsrc_4.8.2-1/rls_dbg/os_linux/hw_x86/exp/lib/libpwr_wb.a(wb_erep.o): In function `antlr::CharScanner::match(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&«»)':
/usr/include/antlr/CharScanner.hpp:245: undefined reference to `antlr::MismatchedCharException::MismatchedCharException(int, int, bool, antlr::CharScanner*)'
/usr/include/antlr/CharScanner.hpp:245: undefined reference to `typeinfo for antlr::MismatchedCharException'
/home/sk/Projects/pwrsrc_4.8.2-1/rls_dbg/os_linux/hw_x86/exp/lib/libpwr_wb.a(wb_erep.o): In function `antlr::CharScanner::matchNot(int)':
/usr/include/antlr/CharScanner.hpp:258: undefined reference to `antlr::MismatchedCharException::MismatchedCharException(int, int, bool, antlr::CharScanner*)'
/usr/include/antlr/CharScanner.hpp:258: undefined reference to `typeinfo for antlr::MismatchedCharException'
/home/sk/Projects/pwrsrc_4.8.2-1/rls_dbg/os_linux/hw_x86/exp/lib/libpwr_wb.a(wb_erep.o): In function `antlr::CharScanner::matchRange(int, int)':
/usr/include/antlr/CharScanner.hpp:270: undefined reference to `antlr::MismatchedCharException::MismatchedCharException(int, int, int, bool, antlr::CharScanner*)'
/usr/include/antlr/CharScanner.hpp:270: undefined reference to `typeinfo for antlr::MismatchedCharException'
/home/sk/Projects/pwrsrc_4.8.2-1/rls_dbg/os_linux/hw_x86/exp/lib/libpwr_wb.a(wb_erep.o): In function `antlr::BaseAST::removeChildren()':
/usr/include/antlr/BaseAST.hpp:124: undefined reference to `antlr::nullAST'

... a couple of more pages with similar sort of errors ...

[/code:1] </code>

is there something that I have done wrong?
any help would be appreciated.

regards,
Shahzad Ak
The administrator has disabled public write access.

Re:Compile fail on Ubuntu 11.04 12 years 9 months ago #2483

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3178
  • Thank you received: 502
  • Karma: 133
Hi Shahzad,

You have to download antlr V2.7.7 from www.antlr.org. Unpack and edit the file
lib/cpp/antlr/CharScanner.hpp and add

#include <strings.h>
#include <stdio.h>

Build with

> ./configure
> make
> sudo make install

/Claes

Post edited by: claes, at: 2011/07/20 21:55
The administrator has disabled public write access.

Re:Compile fail on Ubuntu 11.04 12 years 9 months ago #2491

  • shahzad
  • shahzad's Avatar
HI Claes,

Thanks for the tip, but it seems not working. Downloaded antlr-2.7.7 from www.antlr2.org/download, updated the file with the required changes and installed.

I have also removed the previous antlr (with apt-get remove antlr) and when I run antlr from the shell it displays version 2.7.7 so that seems to be Ok.

I wonder if I have to clean the pwr project first? Do I have to start from scratch by deleting the current tree and unpacking, setting environment etc ?

Here is the error
[code:1]
/home/sk/Projects/pwrsrc_4.8.2-1/xtt/exe/rt_xtt/gtk/.os_linux/.hw_x86
Linking /home/sk/Projects/pwrsrc_4.8.2-1/rls_dbg/os_linux/hw_x86/xtt/exe/rt_xtt

/home/sk/Projects/pwrsrc_4.8.2-1/xtt/exe/wb_ge/gtk/.os_linux/.hw_x86
Linking /home/sk/Projects/pwrsrc_4.8.2-1/rls_dbg/os_linux/hw_x86/xtt/exe/wb_ge
/home/sk/Projects/pwrsrc_4.8.2-1/rls_dbg/os_linux/hw_x86/exp/lib/libpwr_wb.a(wb_erep.o): In function `~RecognitionException':
/usr/include/antlr/RecognitionException.hpp:28: undefined reference to `vtable for antlr::RecognitionException'
/home/sk/Projects/pwrsrc_4.8.2-1/rls_dbg/os_linux/hw_x86/exp/lib/libpwr_wb.a(wb_erep.o): In function `~MismatchedCharException':
/usr/include/antlr/MismatchedCharException.hpp:90: undefined reference to `vtable for antlr::MismatchedCharException'
/usr/include/antlr/MismatchedCharException.hpp:90: undefined reference to `antlr::BitSet::~BitSet()'
/home/sk/Projects/pwrsrc_4.8.2-1/rls_dbg/os_linux/hw_x86/exp/lib/libpwr_wb.a(wb_erep.o): In function `antlr::CharScanner::consumeUntil(antlr::BitSet const&«»)':
/usr/include/antlr/CharScanner.hpp:178: undefined reference to `antlr::BitSet::member(unsigned int) const'
/home/sk/Projects/pwrsrc_4.8.2-1/rls_dbg/os_linux/hw_x86/exp/lib/libpwr_wb.a(wb_erep.o): In function `antlr::CharScanner::match(int)':
/usr/include/antlr/CharScanner.hpp:200: undefined reference to `antlr::MismatchedCharException::MismatchedCharException(int, int, bool, antlr::CharScanner*)'
/usr/include/antlr/CharScanner.hpp:200: undefined reference to `typeinfo for antlr::MismatchedCharException'
/home/sk/Projects/pwrsrc_4.8.2-1/rls_dbg/os_linux/hw_x86/exp/lib/libpwr_wb.a(wb_erep.o): In function `antlr::CharScanner::match(antlr::BitSet const&«»)':
/usr/include/antlr/CharScanner.hpp:211: undefined reference to `antlr::BitSet::member(unsigned int) const'
/usr/include/antlr/CharScanner.hpp:212: undefined reference to `antlr::MismatchedCharException::MismatchedCharException(int, antlr::BitSet, bool, antlr::CharScanner*)'
/usr/include/antlr/CharScanner.hpp:212: undefined reference to `antlr::BitSet::~BitSet()'
/usr/include/antlr/CharScanner.hpp:212: undefined reference to `typeinfo for antlr::MismatchedCharException'
/usr/include/antlr/CharScanner.hpp:212: undefined reference to `antlr::BitSet::~BitSet()'
/home/sk/Projects/pwrsrc_4.8.2-1/rls_dbg/os_linux/hw_x86/exp/lib/libpwr_wb.a(wb_erep.o): In function `antlr::CharScanner::match(char const*)':
/usr/include/antlr/CharScanner.hpp:227: undefined reference to `antlr::MismatchedCharException::MismatchedCharException(int, int, bool, antlr::CharScanner*)'
/usr/include/antlr/CharScanner.hpp:227: undefined reference to `typeinfo for antlr::MismatchedCharException'
/home/sk/Projects/pwrsrc_4.8.2-1/rls_dbg/os_linux/hw_x86/exp/lib/libpwr_wb.a(wb_erep.o): In function `antlr::CharScanner::match(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&«»)':

....
[/code:1]

Best Regards
Shahzad
The administrator has disabled public write access.

Re:Compile fail on Ubuntu 11.04 12 years 9 months ago #2492

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3178
  • Thank you received: 502
  • Karma: 133
Hi Shahzad,

When you have installed a new package or archive you have to update the configuration with

> pwre configure

Look at the output and check that libantlr is found.

To start the build from scratch you delete the build tree, $pwre_broot/os_linux, and then build with

> pwre create_all_modules
> pwre build_all_modules

/Claes
The administrator has disabled public write access.

Re:Compile fail on Ubuntu 11.04 12 years 9 months ago #2505

  • shahzad
  • shahzad's Avatar
Hi Claes,
Thanks that tip worked and I actually started again from scratch (on a different machine). Hit a bump that JNI couldn't be found which was solved by exporting the JDK variable setting to java home directory.
However; now it cannot find -lpwr_cifx_dummy.

/home/sk/Projects/pwrsrc_4.8.2-1/java/jpwr/rt_client/src/.os_linux/.hw_x86
Compiling ../../Gdh.java
Note: ../../Gdh.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Building archive pwr_rt_client.jar special

/home/sk/Projects/pwrsrc_4.8.2-1/java/exe/jpwr_rt_gdh/src/.os_linux/.hw_x86
Compiling ../../jpwr_rt_Errh.c
Compiling ../../jpwr_rt_hist.cpp
Compiling ../../jpwr_rt_mh.c
Compiling ../../jpwr_rt_qcom.c
Compiling ../../jpwr_rt_rtsecurity.c
Compiling ../../rt_gdh.c
Compiling ../../rt_io_ssab.c
Compiling ../../rtt_dummy.c
Compiling ../../jpwr_rt_gdh.c
../../jpwr_rt_gdh.c: In function ‘Java_jpwr_rt_Gdh_refObjectInfo’:
../../jpwr_rt_gdh.c:525:17: warning: comparison between ‘pwr_eType’ and ‘enum <anonymous>’
Linking /home/sk/Projects/pwrsrc_4.8.2-1/rls_dbg/os_linux/hw_x86/java/exe/jpwr_rt_gdh
/usr/bin/ld: cannot find -lpwr_cifx_dummy
collect2: ld returned 1 exit status
make: *** [/home/sk/Projects/pwrsrc_4.8.2-1/rls_dbg/os_linux/hw_x86/java/exe/jpwr_rt_gdh] Error 1
The administrator has disabled public write access.

Re:Compile fail on Ubuntu 11.04 12 years 9 months ago #2506

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3178
  • Thank you received: 502
  • Karma: 133
Hi Shahzad,

cifx_dummy is a new archive in V4.8.2 and unfortunately it wasn't added to the build script. You can add it to $pwre_bin/pwre.pl after the build command for usb_dummy:

[code:1] _build(\"lib\",\"usbio_dummy\",\"src\",\"init lib\"«»);
_build(\"lib\",\"usb_dummy\",\"src\",\"init lib\"«»);
_build(\"lib\",\"cifx_dummy\",\"src\",\"init lib\"«»);
merge();
_module(\"xtt\"«»);
--
_build(\"lib\",\"usbio_dummy\",\"src\",\"init lib\"«»);
_build(\"lib\",\"usb_dummy\",\"src\",\"init lib\"«»);
_build(\"lib\",\"cifx_dummy\",\"src\",\"init lib\"«»);
merge();
_module(\"rt\"«»);[/code:1]


and then continue with

> pwre build_all_modules

/Claes
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 9.465 seconds