On Nov 26, 9:13 pm, "shao.d" <[EMAIL PROTECTED]> wrote:
> On Nov 25, 1:41 pm, Andrew <[EMAIL PROTECTED]> wrote:
>
> Andrew,
>
> All I know is what I read 
> fromhttp://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=3
> I may have a solution to your problem--in short, I suspect that in
> your
> /usr/local/lib
> directory there is an OLD copy of libiulib.a from a previous
> compilation attempt.
> Delete it and other old libs.  

OK, i seem to have compiled ocropus.

deleting the old /usr/local/lib/libiulib.a did not help. (I deleted,
then recompiled iulib, making sure it was the latest SVN, with the
patching and autoreconf-ing).  What DID help was to add the "-fPIC"
flag to the iulib ./configure.

It appears that the suggestion in the error message -- to compile with
the "-fPIC" flag -- refers to the iulib compilation, and not the
ocropus flags. Caution: I mean *suggestion*, as in "correction",
because it seems that ocropus, by default, already uses that flag,
without explicitly it being an explicit option of ./configure.

So, after some tinkering, I fed the "-fPIC" to all the flags I know
(along with "-DPIC", for good measure), for the iulib ./configure, and
that apparently yielded a libiulib.a that ocropus liked.

And I did not need to give ocropus ./configure any options at all.

(my iulib configure command was:

    ./configure  CFLAGS="-fPIC -DPIC"  CPPFLAGS="-fPIC -DPIC"
CXXFLAGS="-fPIC -DPIC"

don't know how much of the above was irrelevant or superfluous
)

>That old library is only a static

I am confused about shared/static. There is an "--enable-shared"
switch for iulib; i used it, but I did not see a shared object created
as a result.  (There is also a sharedstatedir option, but I had no
success using that either, earlier, not even knowing what it is for)

Do I still need to try to achieve shared state, even though ocropus
seems to be compiled OK ?

So, in my (uninformed) observation, I would infer that perhaps the GNU
autotools worked correctly for the ocropus source, but fell short for
the iulib source, on the amd64 (however, i know too little to be
anywhere near certain this is the case)


> library, which on AMD64
> type Linux systems cannot be used to link into a new dynamic library
> that is trying
> to use it.  The reason I believe that that is an old library is that I
> notice in the configure
> script shipped with iulib the default installation directory prefix
> appears to be set to /usr/local,
> whereas in my instructions for my patches, I recommend installing all
> packages in a subdirectory
> of one's home directory.
>
> What libtool really wants to do, I think, is to find the libiulib.la
> file, read it, then use the
> libiulib.so dynamic linked library instead of the static linked one.
> So seeing libiulib.a is a
> big red flag.
>
> I also recommend NOT using environment variables to set CPPFLAGS,
> LDFLAGS, etc.
> Simply set them on the same line after the configure command
> ./configure --prefix=$HOME/busr CPPFLAGS="-I..." LDFLAGS="-L..."
>
> I do not believe that you have to manually set -fPIC at all.  (One of
> the points of GNU autotools is to
> set all of these flags automatically.)  I would also check the output
> of configure
> for iulib and OCRopus--in the output it tells you whether the -fPIC
> and -DPIC flags are accepted.
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ocropus" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/ocropus?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to