openSuse fbembed/fbclient linking issues due to incorrect fbembed.pc

Andrzej Hunt andrzej at ahunt.org
Mon Aug 19 23:18:46 PDT 2013


Hi all,

Based on Michael's/Fridrich's inputs I've debugged the fbclient/fbembed
linking issues on openSuse (tested fully on 12.3, but 12.2 exhibits the
same characteristics), and confirmed that it is indeed just a
copy-and-paste or similar error.

I've submitted this as a bug to openSuse. In the meantime should you
need embedded firebird on openSuse I'd recommend not using system
firebird, or alternatively  manually fixing fbembed.pc
(/usr/lib[64]/pkgconfig/fbembed.pc) as below.

Full details:
- fbembed.pc (in fbembed-devel) mentions "-lfbclient" instead of
"-lfbembed" i.e. links against the wrong library (both have the same
interface, but only fbembed has the embedded firebird code within).
(- Due to the above, any builds --with-system-firebird but without
fbclient installed will therefore fail, but this is only a symptom.)
- A successful build (i.e. with fbclient) installed will run but cannot
create or open embedded firebird dbs (remote connections should however
still be usable).
- Manually editing fbembed.pc to mention -lfbembed insted fixes things
-- everything builds without fbclient installed, embedded firebird works
as expected.



Additionally, I'm considering whether it's worthwhile specifically
detecting the error that occurs when trying to open/create an embedded
db with fbclient in order to show a more obvious dialog -- this should
be fairly simple (I still need to make the error reporting a bit more
user friendly anyway for fb).

Also, I could maybe adapt the Driver class to not supply
"sdbc:embedded:firebird" as a supported url scheme when we are running
fbclient, I still need to look at how this could be verified. This might
not be such a good idea though since then trying to open a .odb with
embedded firebird will probably result in a cryptic "driver not found"
or similar error, whereas the above solution will result in a specific
error message.


Cheers,

	Andrzej



More information about the LibreOffice mailing list