> > Unfortunately not. FreeBSD account, which we use for testing, has badly 
> > compiled C libraries, and doesn't allow to link C++ libraries to C programs.
> > 
> > Perl extension itself compiles fine, but running tests results with some 
> > unresolved externals.
> 
> That sounds about like what I saw.  Unresolved externals were for C++ 
> builtin's like delete (with name mangling).

It's time to describe all my experience.

The very first problem I've met was linking of sabcmd program. Original 
version of this utility was written in C, while the sablot libraries was 
C++. Linking on FreeBSD resulted to unresolved externals related to 
exception handling. Just renaming .c to .cpp file was enough (of course 
together with plenty of work, which was done by libtool and automake).

I serched the deja.com archive. Explanation, I've found said, that 
problem is caused by incompatibility between compiler version and 
version of libc (or stdc++ stc.). It makes sense to me. Compiler 
(linker?) adds some 'magic' calls to the output files, which are 
responsible for several system tasks, exception handling is one of them.

Another version of compiler doesn't add these calls, because it 
supposes, that they are introduced in std. libs. Thats all.

> I'm curious that you say that the C Libraries are badly compiled.  Is this 
> something specific to the machine where you have an account, or part of the 
> way a default FreeBSD machine is configured?  What do you know about this 
> problem?  I've had problems as described on FreeBSD systems which should be 
> pretty vanilla in this regard.

Actually C libraries are not *badly* compiled, but not compatible with 
used compiler. I'm not expert on this field, and compiling and testing 
sablotron on FreeBSD is my only experience with this system. somebody 
else has to help us.

Our account was managed somewhere at West Coast (actually very far from 
Prague :-), and I don't know any details.

> libtool has some problems with linking C and C++ which are noted in its 
> documentation.  If this hasn't caused problems under Linux, then where is the 
> point of divergence?  Has any comparison been done between the way gcc is 
> compiled under Linux and the way it's compiled under FreeBSD?  As far as I can 
> tell, the differences are all contained in the GCC source distribution config 
> files.

Libtool ducumentation is little bit vague on this filed, but described 
problems are very similar to ours. The point of divergence is given 
strictly by the compiler implementation (just my opinion).

> If there is a problem with the gcc/freebsd config, and it can be addressed 
> without screwing other programs up, it might be possible to get that changed.
> 
> > Any help with tests on this field are *very* welcome.
> 
> Tell me what you need.


Next steps woul'd be usefull.

a) try to build and install Sablotron on FreeBSD (it's done, as fare as 
I know)

b) try to compile and test perl module.

If this file succeeds, it's great, but not informative :-)

If make, make test, fails, please send us reported stuff, and try fo 
find, which std. libraries are reported function living in. Additional 
step is to specify these libraries via 'LIBS' parameter in Makefile.PL.

I'll try it using our FreeBSD account (unfortunatelly connection to this 
account is dead while composing this message) to do parallel steps.


-- 
Pavel Hlavnicka
Ginger Alliance Ltd.
Prague; Czech Republic


Reply via email to