Skip to Main Content

linking problem with compiler in 12.6 release

userCIPJul 20 2017 — edited Aug 1 2017

Hello,

we just switch to productive developer studio 12.6 release and compiled all internal code. We observed a strange linking behaviour...

Perhaps someone can help and bring some light into the darkness !

thanks,

Christian and team

... here is the relevant compile sequence ...

Step 1:

Linking the Program Msb_fuell with Library liballgmessw.a:

1/29. Linking with 1 libs : /opt/developerstudio12.6/bin/CC -o /Entw/SOL126C14/s1/messw/main/Msb_fuell Msb_fuell.o -erroff=hidef,hidevf -errwarn=%all -errwarn=no%wnoretvalue -g0 -mt -std=c++14 /Entw/SOL126C14/Entw/lib/libs1db.a

(+ Lib /Entw/SOL126C14/Entw/lib/libs1db.a)

Undefined first referenced

symbol in file

hole_globals(int, char**) Msb_fuell.o

Hkm::CppDbc::SqlOrderBy::~SqlOrderBy() /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

typeinfo for TransactionImpl /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

RefCountPtrBase<Hkm::CppDbc::DbCursor>::mPtrMap /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

[Hint: static member RefCountPtrBase<Hkm::CppDbc::DbCursor>::mPtrMap must be defined in the program]

operator<<(std::ostream &, const DataSourceImpl&) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

Hkm::CppDbc::SqlSelect::~SqlSelect() /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

mod_delete(smod_info*) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

mod_leer(smod_info*, char*) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

Hkm::CppDbc::SqlGroupBy::~SqlGroupBy() /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

ResourceFactory<DataSourceImpl>::create(const std::string &, const TransactionConcurrency&) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

satzart(const char*) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

vtable for Hkm::CppDbc::SqlWhere /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

[Hint: static member vtable for Hkm::CppDbc::SqlWhere must be defined in the program]

RefCountPtrBase<Hkm::CppDbc::DbCursor>::mNullImpl /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

[Hint: static member RefCountPtrBase<Hkm::CppDbc::DbCursor>::mNullImpl must be defined in the program]

eprotokoll(const char*, short, const char*, short) Msb_fuell.o

ResourceManager<DataSourceImpl>::normalizeId(const std::string &) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

ResourceManager<TransactionImpl>::promote(TransactionImpl&, const TransactionIsolation&) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

DataSourceImpl::GLOBAL_TRANSACTION_ID /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

[Hint: static member DataSourceImpl::GLOBAL_TRANSACTION_ID must be defined in the program]

Hkm::CppDbc::SqlHaving::~SqlHaving() /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

vtable for Hkm::CppDbc::SqlOrderBy /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

[Hint: static member vtable for Hkm::CppDbc::SqlOrderBy must be defined in the program]

db_oeffne(const char*, short) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

vtable for Hkm::CppDbc::SqlGroupBy /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

[Hint: static member vtable for Hkm::CppDbc::SqlGroupBy must be defined in the program]

ResourceManager<TransactionImpl>::getRankOf(const TransactionImpl&) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

Hkm::CppDbc::SqlIntoTemp::~SqlIntoTemp() /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

ResourceManager<DataSourceImpl>::getRankOf(const DataSourceImpl&) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

vtable for Hkm::CppDbc::SqlSelect /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

[Hint: static member vtable for Hkm::CppDbc::SqlSelect must be defined in the program]

key_sql(short, short, short, short, char**, char**, char**, char*, char*) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

vtable for Hkm::CppDbc::SqlFrom /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

[Hint: static member vtable for Hkm::CppDbc::SqlFrom must be defined in the program]

ResourceManager<TransactionImpl>::normalizeId(const std::string &) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

RefCountPtrBase<Hkm::CppDbc::DbAccessManager>::mNullImpl /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

[Hint: static member RefCountPtrBase<Hkm::CppDbc::DbAccessManager>::mNullImpl must be defined in the program]

Hkm::CppDbc::SqlWhere::~SqlWhere() /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

Transaction::select(const Hkm::CppDbc::DbQuery&, int)const /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

vtable for Hkm::CppDbc::SqlIntoTemp /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

[Hint: static member vtable for Hkm::CppDbc::SqlIntoTemp must be defined in the program]

Hkm::CppDbc::SqlFrom::~SqlFrom() /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

TransactionImpl::TransactionImpl(const std::string &, const TransactionIsolation&) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

vtable for Hkm::CppDbc::DbSelect /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

[Hint: static member vtable for Hkm::CppDbc::DbSelect must be defined in the program]

emeldung(const char*, short, short, const char*, ...) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

mod_write(smod_info*, char*, char*, short)       /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

cnf_fuell(void*, void*, short, short, short, short, const char*) /Entw/SOL126C14/Entw/lib/libs1db.a(msb_cnf_fuel.o)

global2 Msb_fuell.o

globals /Entw/SOL126C14/Entw/lib/libs1db.a(msb_cnf_fuel.o)

nil_sprintf(const char*, char*, const char*, ...) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

ResourceManager<TransactionImpl>::isAllowedPromotion(const TransactionImpl&, const TransactionIsolation&, const TransactionIsolation&) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

mod_read(smod_info*, short, char*) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

fproto(const char*, const char*, const char*, long, short) /Entw/SOL126C14/Entw/lib/libs1db.a(msb_cnf_fuel.o)

RefCountPtrBase<Hkm::CppDbc::DbAccessManager>::mPtrMap /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

[Hint: static member RefCountPtrBase<Hkm::CppDbc::DbAccessManager>::mPtrMap must be defined in the program]

mod_key_upd(smod_info*, char*, char*)     /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

operator<<(std::ostream &, const TransactionImpl&) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

vtable for Hkm::CppDbc::SqlHaving /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

[Hint: static member vtable for Hkm::CppDbc::SqlHaving must be defined in the program]

ld: fatal: symbol referencing errors

Step 2:

Now, if we link with one more Library (liballgmessw.a), the Module Archimed.o from liballgmessw.a is linked, though none of the symbols needed can be found in Archimed.o :

2/29. Linking with 2 libs : /opt/developerstudio12.6/bin/CC -o /Entw/SOL126C14/s1/messw/main/Msb_fuell Msb_fuell.o -erroff=hidef,hidevf -errwarn=%all -errwarn=no%wnoretvalue -g0 -mt -std=c++14 /Entw/SOL126C14/Entw/lib/libs1db.a /Entw/SOL126C14/Entw/lib/liballgmessw.a

(+ Lib /Entw/SOL126C14/Entw/lib/liballgmessw.a)

Undefined first referenced

symbol in file

hole_globals(int, char**) Msb_fuell.o

Hkm::CppDbc::SqlOrderBy::~SqlOrderBy() /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

typeinfo for TransactionImpl /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

RefCountPtrBase<Hkm::CppDbc::DbCursor>::mPtrMap /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

[Hint: static member RefCountPtrBase<Hkm::CppDbc::DbCursor>::mPtrMap must be defined in the program]

operator<<(std::ostream &, const DataSourceImpl&) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

Poco::RegularExpression::~RegularExpression() /Entw/SOL126C14/Entw/lib/liballgmessw.a(Archimed.o)

Hkm::CppDbc::SqlSelect::~SqlSelect() /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

mod_delete(smod_info*) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

mod_leer(smod_info*, char*) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

Hkm::CppDbc::SqlGroupBy::~SqlGroupBy() /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

hkmDebugPrintf(__FILE*, const char*, long, const char*) /Entw/SOL126C14/Entw/lib/liballgmessw.a(Archimed.o)

ResourceFactory<DataSourceImpl>::create(const std::string &, const TransactionConcurrency&) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

satzart(const char*) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

konvzt_ic(short, long, short, short*, char*) /Entw/SOL126C14/Entw/lib/liballgmessw.a(Archimed.o)

hkmDebugPrintf(__FILE*, const char*, std::string, const char*) /Entw/SOL126C14/Entw/lib/liballgmessw.a(Archimed.o)

vtable for Hkm::CppDbc::SqlWhere /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

[Hint: static member vtable for Hkm::CppDbc::SqlWhere must be defined in the program]

RefCountPtrBase<Hkm::CppDbc::DbCursor>::mNullImpl /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

[Hint: static member RefCountPtrBase<Hkm::CppDbc::DbCursor>::mNullImpl must be defined in the program]

eprotokoll(const char*, short, const char*, short) Msb_fuell.o

ResourceManager<DataSourceImpl>::normalizeId(const std::string &) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

ResourceManager<TransactionImpl>::promote(TransactionImpl&, const TransactionIsolation&) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

DataSourceImpl::GLOBAL_TRANSACTION_ID /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

[Hint: static member DataSourceImpl::GLOBAL_TRANSACTION_ID must be defined in the program]

Hkm::CppDbc::SqlHaving::~SqlHaving() /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

dbfile /Entw/SOL126C14/Entw/lib/liballgmessw.a(Archimed.o)

Poco::RegularExpression::RegularExpression(const std::string &, int, bool) /Entw/SOL126C14/Entw/lib/liballgmessw.a(Archimed.o)

vtable for Hkm::CppDbc::SqlOrderBy /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

[Hint: static member vtable for Hkm::CppDbc::SqlOrderBy must be defined in the program]

db_oeffne(const char*, short) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

vtable for Hkm::CppDbc::SqlGroupBy /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

[Hint: static member vtable for Hkm::CppDbc::SqlGroupBy must be defined in the program]

ResourceManager<TransactionImpl>::getRankOf(const TransactionImpl&) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

Hkm::CppDbc::SqlIntoTemp::~SqlIntoTemp() /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

ResourceManager<DataSourceImpl>::getRankOf(const DataSourceImpl&) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

vtable for Hkm::CppDbc::SqlSelect /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

[Hint: static member vtable for Hkm::CppDbc::SqlSelect must be defined in the program]

key_sql(short, short, short, short, char**, char**, char**, char*, char*) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

hkm::archimed::mischerPfannen_g /Entw/SOL126C14/Entw/lib/liballgmessw.a(Archimed.o)

[Hint: static member hkm::archimed::mischerPfannen_g must be defined in the program]

vtable for Hkm::CppDbc::SqlFrom /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

[Hint: static member vtable for Hkm::CppDbc::SqlFrom must be defined in the program]

ResourceManager<TransactionImpl>::normalizeId(const std::string &) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

RefCountPtrBase<Hkm::CppDbc::DbAccessManager>::mNullImpl /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

[Hint: static member RefCountPtrBase<Hkm::CppDbc::DbAccessManager>::mNullImpl must be defined in the program]

Hkm::CppDbc::SqlWhere::~SqlWhere() /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

Transaction::select(const Hkm::CppDbc::DbQuery&, int)const /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

vtable for Hkm::CppDbc::SqlIntoTemp /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

[Hint: static member vtable for Hkm::CppDbc::SqlIntoTemp must be defined in the program]

Poco::Bugcheck::assertion(const char*, const char*, int, const char*) /Entw/SOL126C14/Entw/lib/liballgmessw.a(Archimed.o)

Hkm::CppDbc::SqlFrom::~SqlFrom() /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

hkm::archimed::i_informix_g /Entw/SOL126C14/Entw/lib/liballgmessw.a(Archimed.o)

[Hint: static member hkm::archimed::i_informix_g must be defined in the program]

TransactionImpl::TransactionImpl(const std::string &, const TransactionIsolation&) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

zt2ascii(short, long) /Entw/SOL126C14/Entw/lib/liballgmessw.a(Archimed.o)

vtable for Hkm::CppDbc::DbSelect /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

[Hint: static member vtable for Hkm::CppDbc::DbSelect must be defined in the program]

emeldung(const char*, short, short, const char*, ...) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

Poco::RegularExpression::match(const std::string &, unsigned int)const /Entw/SOL126C14/Entw/lib/liballgmessw.a(Archimed.o)

mod_write(smod_info*, char*, char*, short) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

cnf_fuell(void*, void*, short, short, short, short, const char*) /Entw/SOL126C14/Entw/lib/libs1db.a(msb_cnf_fuel.o)

aes5(long) /Entw/SOL126C14/Entw/lib/liballgmessw.a(Archimed.o)

global2 Msb_fuell.o

globals /Entw/SOL126C14/Entw/lib/libs1db.a(msb_cnf_fuel.o)

nil_sprintf(const char*, char*, const char*, ...) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

ResourceManager<TransactionImpl>::isAllowedPromotion(const TransactionImpl&, const TransactionIsolation&, const TransactionIsolation&) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

/Entw/SOL126C14/Entw/lib/libs1db.a(msb_cnf_fuel.o)

mod_read(smod_info*, short, char*) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

fproto(const char*, const char*, const char*, long, short) /Entw/SOL126C14/Entw/lib/libs1db.a(msb_cnf_fuel.o)

RefCountPtrBase<Hkm::CppDbc::DbAccessManager>::mPtrMap /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

[Hint: static member RefCountPtrBase<Hkm::CppDbc::DbAccessManager>::mPtrMap must be defined in the program]

mod_key_upd(smod_info*, char*, char*)     /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

operator<<(std::ostream &, const TransactionImpl&) /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

vtable for Hkm::CppDbc::SqlHaving /Entw/SOL126C14/Entw/lib/libs1db.a(msb.o)

[Hint: static member vtable for Hkm::CppDbc::SqlHaving must be defined in the program]

Remark:

Here is a list of Modules in liballgmessw.a:

rein@er200:~: ar -tv /Entw/SOL126C14/Entw/lib/liballgmessw.a

rw-rw-r-- 560/  30021829512 Jul 19 14:44 2017 AllMstList.o

rw-rw-r-- 560/  30021360232 Jul 19 14:45 2017 Archimed.o

rw-rw-r-- 560/  3002 785588 Jul 19 14:45 2017 Eventfenster.o

rw-rw-r-- 560/  3002 449556 Jul 19 14:45 2017 Eventviewad.o

rw-rw-r-- 560/  3002 615360 Jul 19 14:45 2017 FtjObj.o

rw-rw-r-- 560/  3002 581420 Jul 19 14:45 2017 Messpunkt.o

rw-rw-r-- 560/  3002 134640 Jul 19 14:45 2017 Messstelle.o

rw-rw-r-- 560/  3002 583252 Jul 19 14:45 2017 MischerPfanne.o

rw-rw-r-- 560/  3002 862684 Jul 19 14:45 2017 MstList.o

rw-rw-r-- 560/  30021744924 Jul 19 14:46 2017 MstObj.o

rw-rw-r-- 560/  3002 580476 Jul 19 14:46 2017 MstZeiten.o

rw-rw-r-- 560/  3002 711220 Jul 19 14:46 2017 Produkt.o

rw-rw-r-- 560/  30021476452 Jul 19 14:46 2017 Produktdaten.o

rw-rw-r-- 560/  30021336692 Jul 19 14:46 2017 SchmelzDaten.o

rw-rw-r-- 560/  3002 636216 Jul 19 14:46 2017 Schmelze.o

rw-rw-r-- 560/  3002 605780 Jul 19 14:46 2017 allgmessw.o

rw-rw-r-- 560/  3002 105440 Jul 19 14:46 2017 allgmesswrpc.o

rw-rw-r-- 560/  3002  94592 Jul 19 14:47 2017 catch_event.o

rw-rw-r-- 560/  3002 300860 Jul 19 14:47 2017 messw2plot.o

rw-rw-r-- 560/  3002  90672 Jul 19 14:47 2017 messw2zyklus.o

rw-rw-r-- 560/  3002  99624 Jul 19 14:47 2017 messw_prot.o

rw-rw-r-- 560/  3002  15532 Jul 19 14:47 2017 mw_remote_clnt.o

rw-rw-r-- 560/  3002  15444 Jul 19 14:47 2017 mw_remote_xdr.o

If we remove Archimed.o from liballgmessw.a , another Module ist linked instead (FtjObj.o) …

If we remove liballgmessw.a from the LinkList, Msb_fuell can be linked completely:

/opt/developerstudio12.6/bin/CC -o /Entw/SOL126C14/s1/messw/main/Msb_fuell Msb_fuell.o -erroff=hidef,hidevf -errwarn=%all -errwarn=no%wnoretvalue -g0 -mt -std=c++14 /Entw/SOL126C14/Entw/lib/libs1db.a  /Entw/SOL126C14/Entw/lib/liballgdbC.a /Entw/SOL126C14/Entw/lib/liballgdb.a /Entw/SOL126C14/Entw/lib/liballgec.a /Entw/SOL126C14/Entw/lib/liballgutilC.a /Entw/SOL126C14/Entw/lib/liballgrkop.a /Entw/SOL126C14/Entw/lib/liballgsock.a /Entw/SOL126C14/Entw/lib/liballgmod.a /Entw/SOL126C14/Entw/lib/liballgsys.a /Entw/SOL126C14/Entw/lib/liballgmod.a /Entw/SOL126C14/Entw/informix/lib/esql/libifos.a /Entw/SOL126C14/Entw/informix/lib/esql/libifgen.a /Entw/SOL126C14/Entw/informix/lib/esql/libifsql.a /Entw/SOL126C14/Entw/informix/lib/libifasf.a /Entw/SOL126C14/Entw/informix/lib/esql/libifos.a /Entw/SOL126C14/Entw/informix/lib/esql/libifgen.a /Entw/SOL126C14/Entw/informix/lib/esql/libifgls.a /Entw/SOL126C14/Entw/poco/lib/libPocoNet.a /Entw/SOL126C14/Entw/poco/lib/libPocoUtil.a /Entw/SOL126C14/Entw/poco/lib/libPocoJSON.a /Entw/SOL126C14/Entw/poco/lib/libPocoXML.a /Entw/SOL126C14/Entw/poco/lib/libPocoFoundation.a /Entw/SOL126C14/Entw/xerces.2.8.0/lib/libxerces-c.a -ldl -lgen -lsocket -lnsl -lm

Remark:

The symbol-list of liballgmessw.a can be found in the file liballgmessw_symbols.txt.

Our Question:

Why does the Linker link Archimed.o to Msb_fuell ? We can't see any Symbol in Archimed.o, which is needed by Msb_fuell…

Comments
Post Details
Added on Jul 20 2017
18 comments
757 views