RE: Re: [greenstone-devel] Problems compiling 2.72 source on FreeBSD

From Alexis Denis Martinez
DateFri, 19 Jan 2007 09:14:32 -0500
Subject RE: Re: [greenstone-devel] Problems compiling 2.72 source on FreeBSD
Hi Michael

Thanks a lot, but yours suggestion fix one problems but another problems
appears, the essential is that gmake can't find linked librarys because
the path is not the real one, I try fix the problem changing #include
<iconv.h> with #include "iconv.h" that is the same to do your
suggestion, and appear the same fallows error:

gcc -fexceptions -o mgpp_stem_idx mgpp_stem_idx.o mg_files.o stemmer.o
invf.o UCArray.o ../lib/libmg.a ../../../packages/unac/libunac.a
-lstdc++ -lcrypt -lm
../../../packages/unac/libunac.a(unac.o)(.text+0xf2): In function
`utf16be':
/usr/local/virtual/bvweb/gsdl/packages/unac/unac.c:12596: undefined
reference to `libiconv_open'
../../../packages/unac/libunac.a(unac.o)(.text+0x103):/usr/local/virtual
/bvweb/gsdl/packages/unac/unac.c:12600: undefined reference to
`libiconv_close'
../../../packages/unac/libunac.a(unac.o)(.text+0x486): In function
`convert':
/usr/local/virtual/bvweb/gsdl/packages/unac/unac.c:12730: undefined
reference to `libiconv_open'
../../../packages/unac/libunac.a(unac.o)(.text+0x4b1):/usr/local/virtual
/bvweb/gsdl/packages/unac/unac.c:12734: undefined reference to
`libiconv'
../../../packages/unac/libunac.a(unac.o)(.text+0x4c7):/usr/local/virtual
/bvweb/gsdl/packages/unac/unac.c:12794: undefined reference to
`libiconv_close'
../../../packages/unac/libunac.a(unac.o)(.text+0x556):/usr/local/virtual
/bvweb/gsdl/packages/unac/unac.c:12759: undefined reference to
`libiconv'
gmake[2]: *** [mgpp_stem_idx] Error 1
gmake[2]: Leaving directory
`/usr/local/virtual/bvweb/gsdl/src/mgpp/text'
gmake[1]: *** [all] Error 1
gmake[1]: Leaving directory `/usr/local/virtual/bvweb/gsdl/src/mgpp'
gmake: *** [all] Error 1

This error is because in "iconv.h" declare
"extern iconv_open (const char* tocode, const char* fromcode)" and can't
find libiconv.a library , so I need to know where I can declare the path
to that linked library , the path is "/usr/local/lib" but I can't find
where replace the original linked librarys , in configure I try "
./configure --prefix=/usr/local/virtual/bvweb/gsdl --enable-z3950
--oldincludedir=/usr/local/include " to include old header but not fix
the problem.

Thanks against

Alexis Denis Martinez
PD: Sorry about my English

-----Original Message-----
From: Michael Dewsnip [mailto:mdewsnip@cs.waikato.ac.nz]
Sent: Thursday, January 18, 2007 5:56 PM
To: Alexis Denis Martinez
Cc: greenstone-devel@list.scms.waikato.ac.nz
Subject: Re: [greenstone-devel] Problems compiling 2.72 source on
FreeBSD

Hi,

Try adding "-I." to the compile command, ie.

gcc -c -DHAVE_CONFIG_H -DUNAC_VERSION=\"1.7.0\" -I. -g -O2 -Wall
-Wmissing-declarations -Wmissing-prototypes unac.c

If this works we'll fix the Makefile so this problem won't exist in the
future.

Regards,

Michael

Alexis Denis Martinez wrote:

>Hello Everyone,
>
>I have problems compiling my source distribution (2.72 version) in
>FreeBSD 6 Stable, this is the error
>
>gmake[2]: Leaving directory
`/usr/local/virtual/bvweb/gsdl/packages/d2m'
>making all in unac
>gmake[2]: Entering directory
>`/usr/local/virtual/bvweb/gsdl/packages/unac'
>gcc -c -DHAVE_CONFIG_H -DUNAC_VERSION=\"1.7.0\" -g -O2 -Wall
>-Wmissing-declarations -Wmissing-prototypes unac.c
>unac.c:33:19: iconv.h: No such file or directory
>unac.c: In function `utf16be':
>unac.c:12592: error: syntax error before "cd"
>unac.c:12596: error: `cd' undeclared (first use in this function)
>unac.c:12596: error: (Each undeclared identifier is reported only once
>unac.c:12596: error: for each function it appears in.)
>unac.c:12596: warning: implicit declaration of function `iconv_open'
>unac.c:12596: error: `iconv_t' undeclared (first use in this function)
>unac.c:12600: warning: implicit declaration of function `iconv_close'
>unac.c: In function `convert':
>unac.c:12709: error: syntax error before "cd"
>unac.c:12730: error: `cd' undeclared (first use in this function)
>unac.c:12730: error: `iconv_t' undeclared (first use in this function)
>unac.c:12734: warning: implicit declaration of function `iconv'
>gmake[2]: *** [unac.o] Error 1
>gmake[2]: Leaving directory
>`/usr/local/virtual/bvweb/gsdl/packages/unac'
>gmake[1]: *** [all] Error 1
>gmake[1]: Leaving directory `/usr/local/virtual/bvweb/gsdl/packages'
>gmake: *** [all] Error 1
>
>How you can see, gmake can't find file iconv.h file but this file is in
>the same directory that unac.c when the call #include <iconv.h> must
not
>be a error. In addition, I have installed iconv-2.0.tar.gz library.
>
>Sincerely,
>
>Alexis Denis Martinez
>
>
>
>
>
>-----------------------------------------------------------------------
-
>
>_______________________________________________
>greenstone-devel mailing list
>greenstone-devel@list.scms.waikato.ac.nz
>https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-devel
>
>