glib-2.72 build fails with during linking to libglib-2.0.so0.7200.0 - ld

*The hardware environment I am working in is a QNAP NAS with x86_64 architecture.
The software is a headless, embedded, QNAP-designed Debian-based Gnu/Linux distro based on kernel 4.14.24.
My current issue is in compiling glib-2.72.0, which uses the meson-ninja system, under Python 3.9.
Compilation runs fine
The ninja build fails at
[150/1259] Linking target glib/libglib-2.0.so.0.7200.0
FAILED: glib/libglib-2.0.so.0.7200.0
when, I think, it attempts to link all the *.c.o files listed in the command below:
cc -o glib/libglib-2.0.so.0.7200.0 glib/libglib-2.0.so.0.7200.0.p/deprecated_gallocator.c.o glib/libglib-2.0.so.0.7200.0.p/deprecated_gcache.c.o glib/libglib-2.0.so.0.7200.0.p/deprecated_gcompletion.c.o glib/libglib-2.0.so.0.7200.0.p/deprecated_grel.c.o glib/libglib-2.0.so.0.7200.0.p/deprecated_gthread-deprecated.c.o glib/libglib-2.0.so.0.7200.0.p/garcbox.c.o glib/libglib-2.0.so.0.7200.0.p/garray.c.o glib/libglib-2.0.so.0.7200.0.p/gasyncqueue.c.o glib/libglib-2.0.so.0.7200.0.p/gatomic.c.o glib/libglib-2.0.so.0.7200.0.p/gbacktrace.c.o glib/libglib-2.0.so.0.7200.0.p/gbase64.c.o glib/libglib-2.0.so.0.7200.0.p/gbitlock.c.o glib/libglib-2.0.so.0.7200.0.p/gbookmarkfile.c.o glib/libglib-2.0.so.0.7200.0.p/gbytes.c.o glib/libglib-2.0.so.0.7200.0.p/gcharset.c.o glib/libglib-2.0.so.0.7200.0.p/gchecksum.c.o glib/libglib-2.0.so.0.7200.0.p/gconvert.c.o glib/libglib-2.0.so.0.7200.0.p/gdataset.c.o glib/libglib-2.0.so.0.7200.0.p/gdate.c.o glib/libglib-2.0.so.0.7200.0.p/gdatetime.c.o glib/libglib-2.0.so.0.7200.0.p/gdir.c.o glib/libglib-2.0.so.0.7200.0.p/genviron.c.o glib/libglib-2.0.so.0.7200.0.p/gerror.c.o glib/libglib-2.0.so.0.7200.0.p/gfileutils.c.o glib/libglib-2.0.so.0.7200.0.p/ggettext.c.o glib/libglib-2.0.so.0.7200.0.p/ghash.c.o glib/libglib-2.0.so.0.7200.0.p/ghmac.c.o glib/libglib-2.0.so.0.7200.0.p/ghook.c.o glib/libglib-2.0.so.0.7200.0.p/ghostutils.c.o glib/libglib-2.0.so.0.7200.0.p/giochannel.c.o glib/libglib-2.0.so.0.7200.0.p/gkeyfile.c.o glib/libglib-2.0.so.0.7200.0.p/glib-init.c.o glib/libglib-2.0.so.0.7200.0.p/glib-private.c.o glib/libglib-2.0.so.0.7200.0.p/glist.c.o glib/libglib-2.0.so.0.7200.0.p/gmain.c.o glib/libglib-2.0.so.0.7200.0.p/gmappedfile.c.o glib/libglib-2.0.so.0.7200.0.p/gmarkup.c.o glib/libglib-2.0.so.0.7200.0.p/gmem.c.o glib/libglib-2.0.so.0.7200.0.p/gmessages.c.o glib/libglib-2.0.so.0.7200.0.p/gnode.c.o glib/libglib-2.0.so.0.7200.0.p/goption.c.o glib/libglib-2.0.so.0.7200.0.p/gpattern.c.o glib/libglib-2.0.so.0.7200.0.p/gpoll.c.o glib/libglib-2.0.so.0.7200.0.p/gprimes.c.o glib/libglib-2.0.so.0.7200.0.p/gqsort.c.o glib/libglib-2.0.so.0.7200.0.p/gquark.c.o glib/libglib-2.0.so.0.7200.0.p/gqueue.c.o glib/libglib-2.0.so.0.7200.0.p/grand.c.o glib/libglib-2.0.so.0.7200.0.p/grcbox.c.o glib/libglib-2.0.so.0.7200.0.p/grefcount.c.o glib/libglib-2.0.so.0.7200.0.p/grefstring.c.o glib/libglib-2.0.so.0.7200.0.p/gregex.c.o glib/libglib-2.0.so.0.7200.0.p/gscanner.c.o glib/libglib-2.0.so.0.7200.0.p/gsequence.c.o glib/libglib-2.0.so.0.7200.0.p/gshell.c.o glib/libglib-2.0.so.0.7200.0.p/gslice.c.o glib/libglib-2.0.so.0.7200.0.p/gslist.c.o glib/libglib-2.0.so.0.7200.0.p/gstdio.c.o glib/libglib-2.0.so.0.7200.0.p/gstrfuncs.c.o glib/libglib-2.0.so.0.7200.0.p/gstring.c.o glib/libglib-2.0.so.0.7200.0.p/gstringchunk.c.o glib/libglib-2.0.so.0.7200.0.p/gstrvbuilder.c.o glib/libglib-2.0.so.0.7200.0.p/gtestutils.c.o glib/libglib-2.0.so.0.7200.0.p/gthread.c.o glib/libglib-2.0.so.0.7200.0.p/gthreadpool.c.o glib/libglib-2.0.so.0.7200.0.p/gtimer.c.o glib/libglib-2.0.so.0.7200.0.p/gtimezone.c.o glib/libglib-2.0.so.0.7200.0.p/gtrace.c.o glib/libglib-2.0.so.0.7200.0.p/gtranslit.c.o glib/libglib-2.0.so.0.7200.0.p/gtrashstack.c.o glib/libglib-2.0.so.0.7200.0.p/gtree.c.o glib/libglib-2.0.so.0.7200.0.p/guniprop.c.o glib/libglib-2.0.so.0.7200.0.p/gutf8.c.o glib/libglib-2.0.so.0.7200.0.p/gunibreak.c.o glib/libglib-2.0.so.0.7200.0.p/gunicollate.c.o glib/libglib-2.0.so.0.7200.0.p/gunidecomp.c.o glib/libglib-2.0.so.0.7200.0.p/guri.c.o glib/libglib-2.0.so.0.7200.0.p/gutils.c.o glib/libglib-2.0.so.0.7200.0.p/guuid.c.o glib/libglib-2.0.so.0.7200.0.p/gvariant.c.o glib/libglib-2.0.so.0.7200.0.p/gvariant-core.c.o glib/libglib-2.0.so.0.7200.0.p/gvariant-parser.c.o glib/libglib-2.0.so.0.7200.0.p/gvariant-serialiser.c.o glib/libglib-2.0.so.0.7200.0.p/gvarianttypeinfo.c.o glib/libglib-2.0.so.0.7200.0.p/gvarianttype.c.o glib/libglib-2.0.so.0.7200.0.p/gversion.c.o glib/libglib-2.0.so.0.7200.0.p/gwakeup.c.o glib/libglib-2.0.so.0.7200.0.p/gprintf.c.o glib/libglib-2.0.so.0.7200.0.p/glib-unix.c.o glib/libglib-2.0.so.0.7200.0.p/gspawn.c.o glib/libglib-2.0.so.0.7200.0.p/giounix.c.o glib/libglib-2.0.so.0.7200.0.p/gthread-posix.c.o
-L/opt/lib -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libglib-2.0.so.0 glib/libcharset/libcharset.a subprojects/pcre-8.37/libpcre.a -Wl,-z,nodelete -Wl,-Bsymbolic-functions -pthread -liconv -lm -Wl,--end-group
/opt/bin/ld: glib/libglib-2.0.so.0.7200.0.p/ggettext.c.o: in function `_g_dgettext_should_translate':
/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.72.0/_build/../glib/ggettext.c:315: undefined reference to `libintl_textdomain'
/opt/bin/ld: /share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.72.0/_build/../glib/ggettext.c:316: undefined reference to `libintl_gettext'
/opt/bin/ld: glib/libglib-2.0.so.0.7200.0.p/ggettext.c.o: in function `ensure_gettext_initialized':
/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.72.0/_build/../glib/ggettext.c:107: undefined reference to `libintl_bindtextdomain'
/opt/bin/ld: /share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.72.0/_build/../glib/ggettext.c:110: undefined reference to `libintl_bind_textdomain_codeset'
/opt/bin/ld: glib/libglib-2.0.so.0.7200.0.p/ggettext.c.o: in function `g_dgettext':
/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.72.0/_build/../glib/ggettext.c:402: undefined reference to `libintl_dgettext'
/opt/bin/ld: /share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.72.0/_build/../glib/ggettext.c:402: undefined reference to `libintl_dgettext'
/opt/bin/ld: glib/libglib-2.0.so.0.7200.0.p/ggettext.c.o: in function `g_dcgettext':
/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.72.0/_build/../glib/ggettext.c:429: undefined reference to `libintl_dcgettext'
/opt/bin/ld: /share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.72.0/_build/../glib/ggettext.c:429: undefined reference to `libintl_dcgettext'
/opt/bin/ld: glib/libglib-2.0.so.0.7200.0.p/ggettext.c.o: in function `g_dngettext':
/share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.72.0/_build/../glib/ggettext.c:460: undefined reference to `libintl_dngettext'
/opt/bin/ld: /share/CACHEDEV1_DATA/jmarks/gdk_files/glib-2.72.0/_build/../glib/ggettext.c:460: undefined reference to `libintl_dngettext'
collect2: error: ld returned 1 exit status
Is this is an issue with gettext?
All the *.c.o files in the failed command exist in the correct directory.
The prefix=/opt
Gettext 0.21 is installed.
gettext.h is located in /opt/share/gettext/ and this path is included in CFLAGS and CPPFLAGS
libintl.a is in opt/lib as is its shared library:
# ldconfig -v |grep libintl
libintl.so.8 -> libintl.so.8.2.0
I would like to learn why this is failing and how to fix it.
Many thanks

Related

How to link the bitcodes of PostgreSQL

I want to run llvm-slicer (source) for PostgreSQL main executable file (i.e., PG_ROOT/src/backend/postgres) to carry backward slicing on PostgreSQL.
llvm-slicer runs on top of bitcode (.bc file). I have compiled PostgreSQL via ./configure CC=clang-6.0 && make CC=clang-6.0, duiring which, the final compile command that link many .o files together is (very long):
clang-6.0 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 access/brin/brin.o access/brin/brin_pageops.o access/brin/brin_revmap.o access/brin/brin_tuple.o access/brin/brin_xlog.o access/brin/brin_minmax.o access/brin/brin_inclusion.o access/brin/brin_validate.o access/common/bufmask.o access/common/heaptuple.o access/common/indextuple.o access/common/printsimple.o access/common/printtup.o access/common/relation.o access/common/reloptions.o access/common/scankey.o access/common/session.o access/common/tupconvert.o access/common/tupdesc.o access/gin/ginutil.o access/gin/gininsert.o access/gin/ginxlog.o access/gin/ginentrypage.o access/gin/gindatapage.o access/gin/ginbtree.o access/gin/ginscan.o access/gin/ginget.o access/gin/ginvacuum.o access/gin/ginarrayproc.o access/gin/ginbulk.o access/gin/ginfast.o access/gin/ginpostinglist.o access/gin/ginlogic.o access/gin/ginvalidate.o access/gist/gist.o access/gist/gistutil.o access/gist/gistxlog.o access/gist/gistvacuum.o access/gist/gistget.o access/gist/gistscan.o access/gist/gistproc.o access/gist/gistsplit.o access/gist/gistbuild.o access/gist/gistbuildbuffers.o access/gist/gistvalidate.o access/hash/hash.o access/hash/hashfunc.o access/hash/hashinsert.o access/hash/hashovfl.o access/hash/hashpage.o access/hash/hashsearch.o access/hash/hashsort.o access/hash/hashutil.o access/hash/hashvalidate.o access/hash/hash_xlog.o access/heap/heapam.o access/heap/heapam_handler.o access/heap/heapam_visibility.o access/heap/hio.o access/heap/pruneheap.o access/heap/rewriteheap.o access/heap/syncscan.o access/heap/tuptoaster.o access/heap/vacuumlazy.o access/heap/visibilitymap.o access/index/amapi.o access/index/amvalidate.o access/index/genam.o access/index/indexam.o access/nbtree/nbtcompare.o access/nbtree/nbtinsert.o access/nbtree/nbtpage.o access/nbtree/nbtree.o access/nbtree/nbtsearch.o access/nbtree/nbtsplitloc.o access/nbtree/nbtutils.o access/nbtree/nbtsort.o access/nbtree/nbtvalidate.o access/nbtree/nbtxlog.o access/rmgrdesc/brindesc.o access/rmgrdesc/clogdesc.o access/rmgrdesc/committsdesc.o access/rmgrdesc/dbasedesc.o access/rmgrdesc/genericdesc.o access/rmgrdesc/gindesc.o access/rmgrdesc/gistdesc.o access/rmgrdesc/hashdesc.o access/rmgrdesc/heapdesc.o access/rmgrdesc/logicalmsgdesc.o access/rmgrdesc/mxactdesc.o access/rmgrdesc/nbtdesc.o access/rmgrdesc/relmapdesc.o access/rmgrdesc/replorigindesc.o access/rmgrdesc/seqdesc.o access/rmgrdesc/smgrdesc.o access/rmgrdesc/spgdesc.o access/rmgrdesc/standbydesc.o access/rmgrdesc/tblspcdesc.o access/rmgrdesc/xactdesc.o access/rmgrdesc/xlogdesc.o access/spgist/spgutils.o access/spgist/spginsert.o access/spgist/spgscan.o access/spgist/spgvacuum.o access/spgist/spgvalidate.o access/spgist/spgdoinsert.o access/spgist/spgxlog.o access/spgist/spgtextproc.o access/spgist/spgquadtreeproc.o access/spgist/spgkdtreeproc.o access/spgist/spgproc.o access/table/table.o access/table/tableam.o access/table/tableamapi.o access/tablesample/bernoulli.o access/tablesample/system.o access/tablesample/tablesample.o access/transam/clog.o access/transam/commit_ts.o access/transam/generic_xlog.o access/transam/multixact.o access/transam/parallel.o access/transam/rmgr.o access/transam/slru.o access/transam/subtrans.o access/transam/timeline.o access/transam/transam.o access/transam/twophase.o access/transam/twophase_rmgr.o access/transam/varsup.o access/transam/xact.o access/transam/xlog.o access/transam/xlogarchive.o access/transam/xlogfuncs.o access/transam/xloginsert.o access/transam/xlogreader.o access/transam/xlogutils.o bootstrap/bootparse.o bootstrap/bootstrap.o catalog/catalog.o catalog/dependency.o catalog/heap.o catalog/index.o catalog/indexing.o catalog/namespace.o catalog/aclchk.o catalog/objectaccess.o catalog/objectaddress.o catalog/partition.o catalog/pg_aggregate.o catalog/pg_collation.o catalog/pg_constraint.o catalog/pg_conversion.o catalog/pg_depend.o catalog/pg_enum.o catalog/pg_inherits.o catalog/pg_largeobject.o catalog/pg_namespace.o catalog/pg_operator.o catalog/pg_proc.o catalog/pg_publication.o catalog/pg_range.o catalog/pg_db_role_setting.o catalog/pg_shdepend.o catalog/pg_subscription.o catalog/pg_type.o catalog/storage.o catalog/toasting.o parser/analyze.o parser/gram.o parser/scan.o parser/parser.o parser/parse_agg.o parser/parse_clause.o parser/parse_coerce.o parser/parse_collate.o parser/parse_cte.o parser/parse_enr.o parser/parse_expr.o parser/parse_func.o parser/parse_node.o parser/parse_oper.o parser/parse_param.o parser/parse_relation.o parser/parse_target.o parser/parse_type.o parser/parse_utilcmd.o parser/scansup.o commands/amcmds.o commands/aggregatecmds.o commands/alter.o commands/analyze.o commands/async.o commands/cluster.o commands/comment.o commands/collationcmds.o commands/constraint.o commands/conversioncmds.o commands/copy.o commands/createas.o commands/dbcommands.o commands/define.o commands/discard.o commands/dropcmds.o commands/event_trigger.o commands/explain.o commands/extension.o commands/foreigncmds.o commands/functioncmds.o commands/indexcmds.o commands/lockcmds.o commands/matview.o commands/operatorcmds.o commands/opclasscmds.o commands/policy.o commands/portalcmds.o commands/prepare.o commands/proclang.o commands/publicationcmds.o commands/schemacmds.o commands/seclabel.o commands/sequence.o commands/statscmds.o commands/subscriptioncmds.o commands/tablecmds.o commands/tablespace.o commands/trigger.o commands/tsearchcmds.o commands/typecmds.o commands/user.o commands/vacuum.o commands/variable.o commands/view.o executor/execAmi.o executor/execCurrent.o executor/execExpr.o executor/execExprInterp.o executor/execGrouping.o executor/execIndexing.o executor/execJunk.o executor/execMain.o executor/execParallel.o executor/execPartition.o executor/execProcnode.o executor/execReplication.o executor/execScan.o executor/execSRF.o executor/execTuples.o executor/execUtils.o executor/functions.o executor/instrument.o executor/nodeAppend.o executor/nodeAgg.o executor/nodeBitmapAnd.o executor/nodeBitmapOr.o executor/nodeBitmapHeapscan.o executor/nodeBitmapIndexscan.o executor/nodeCustom.o executor/nodeFunctionscan.o executor/nodeGather.o executor/nodeHash.o executor/nodeHashjoin.o executor/nodeIndexscan.o executor/nodeIndexonlyscan.o executor/nodeLimit.o executor/nodeLockRows.o executor/nodeGatherMerge.o executor/nodeMaterial.o executor/nodeMergeAppend.o executor/nodeMergejoin.o executor/nodeModifyTable.o executor/nodeNestloop.o executor/nodeProjectSet.o executor/nodeRecursiveunion.o executor/nodeResult.o executor/nodeSamplescan.o executor/nodeSeqscan.o executor/nodeSetOp.o executor/nodeSort.o executor/nodeUnique.o executor/nodeValuesscan.o executor/nodeCtescan.o executor/nodeNamedtuplestorescan.o executor/nodeWorktablescan.o executor/nodeGroup.o executor/nodeSubplan.o executor/nodeSubqueryscan.o executor/nodeTidscan.o executor/nodeForeignscan.o executor/nodeWindowAgg.o executor/tstoreReceiver.o executor/tqueue.o executor/spi.o executor/nodeTableFuncscan.o foreign/foreign.o lib/binaryheap.o lib/bipartite_match.o lib/bloomfilter.o lib/dshash.o lib/hyperloglog.o lib/ilist.o lib/integerset.o lib/knapsack.o lib/pairingheap.o lib/rbtree.o lib/stringinfo.o libpq/be-fsstubs.o libpq/be-secure.o libpq/be-secure-common.o libpq/auth.o libpq/crypt.o libpq/hba.o libpq/ifaddr.o libpq/pqcomm.o libpq/pqformat.o libpq/pqmq.o libpq/pqsignal.o libpq/auth-scram.o main/main.o nodes/nodeFuncs.o nodes/nodes.o nodes/list.o nodes/bitmapset.o nodes/tidbitmap.o nodes/copyfuncs.o nodes/equalfuncs.o nodes/extensible.o nodes/makefuncs.o nodes/outfuncs.o nodes/readfuncs.o nodes/print.o nodes/read.o nodes/params.o nodes/value.o optimizer/geqo/geqo_copy.o optimizer/geqo/geqo_eval.o optimizer/geqo/geqo_main.o optimizer/geqo/geqo_misc.o optimizer/geqo/geqo_mutation.o optimizer/geqo/geqo_pool.o optimizer/geqo/geqo_random.o optimizer/geqo/geqo_recombination.o optimizer/geqo/geqo_selection.o optimizer/geqo/geqo_erx.o optimizer/geqo/geqo_pmx.o optimizer/geqo/geqo_cx.o optimizer/geqo/geqo_px.o optimizer/geqo/geqo_ox1.o optimizer/geqo/geqo_ox2.o optimizer/path/allpaths.o optimizer/path/clausesel.o optimizer/path/costsize.o optimizer/path/equivclass.o optimizer/path/indxpath.o optimizer/path/joinpath.o optimizer/path/joinrels.o optimizer/path/pathkeys.o optimizer/path/tidpath.o optimizer/plan/analyzejoins.o optimizer/plan/createplan.o optimizer/plan/initsplan.o optimizer/plan/planagg.o optimizer/plan/planmain.o optimizer/plan/planner.o optimizer/plan/setrefs.o optimizer/plan/subselect.o optimizer/prep/prepjointree.o optimizer/prep/prepqual.o optimizer/prep/preptlist.o optimizer/prep/prepunion.o optimizer/util/appendinfo.o optimizer/util/clauses.o optimizer/util/inherit.o optimizer/util/joininfo.o optimizer/util/orclauses.o optimizer/util/paramassign.o optimizer/util/pathnode.o optimizer/util/placeholder.o optimizer/util/plancat.o optimizer/util/predtest.o optimizer/util/relnode.o optimizer/util/restrictinfo.o optimizer/util/tlist.o optimizer/util/var.o partitioning/partbounds.o partitioning/partdesc.o partitioning/partprune.o port/atomics.o port/pg_sema.o port/pg_shmem.o postmaster/autovacuum.o postmaster/bgworker.o postmaster/bgwriter.o postmaster/checkpointer.o postmaster/fork_process.o postmaster/pgarch.o postmaster/pgstat.o postmaster/postmaster.o postmaster/startup.o postmaster/syslogger.o postmaster/walwriter.o regex/regcomp.o regex/regerror.o regex/regexec.o regex/regfree.o regex/regprefix.o regex/regexport.o replication/logical/decode.o replication/logical/launcher.o replication/logical/logical.o replication/logical/logicalfuncs.o replication/logical/message.o replication/logical/origin.o replication/logical/proto.o replication/logical/relation.o replication/logical/reorderbuffer.o replication/logical/snapbuild.o replication/logical/tablesync.o replication/logical/worker.o replication/walsender.o replication/walreceiverfuncs.o replication/walreceiver.o replication/basebackup.o replication/repl_gram.o replication/slot.o replication/slotfuncs.o replication/syncrep.o replication/syncrep_gram.o rewrite/rewriteRemove.o rewrite/rewriteDefine.o rewrite/rewriteHandler.o rewrite/rewriteManip.o rewrite/rewriteSupport.o rewrite/rowsecurity.o statistics/extended_stats.o statistics/dependencies.o statistics/mcv.o statistics/mvdistinct.o storage/buffer/buf_table.o storage/buffer/buf_init.o storage/buffer/bufmgr.o storage/buffer/freelist.o storage/buffer/localbuf.o storage/file/fd.o storage/file/buffile.o storage/file/copydir.o storage/file/reinit.o storage/file/sharedfileset.o storage/freespace/freespace.o storage/freespace/fsmpage.o storage/freespace/indexfsm.o storage/ipc/barrier.o storage/ipc/dsm_impl.o storage/ipc/dsm.o storage/ipc/ipc.o storage/ipc/ipci.o storage/ipc/latch.o storage/ipc/pmsignal.o storage/ipc/procarray.o storage/ipc/procsignal.o storage/ipc/shmem.o storage/ipc/shmqueue.o storage/ipc/shm_mq.o storage/ipc/shm_toc.o storage/ipc/signalfuncs.o storage/ipc/sinval.o storage/ipc/sinvaladt.o storage/ipc/standby.o storage/large_object/inv_api.o storage/lmgr/lmgr.o storage/lmgr/lock.o storage/lmgr/proc.o storage/lmgr/deadlock.o storage/lmgr/lwlock.o storage/lmgr/lwlocknames.o storage/lmgr/spin.o storage/lmgr/s_lock.o storage/lmgr/predicate.o storage/lmgr/condition_variable.o storage/page/bufpage.o storage/page/checksum.o storage/page/itemptr.o storage/smgr/md.o storage/smgr/smgr.o storage/sync/sync.o tcop/dest.o tcop/fastpath.o tcop/postgres.o tcop/pquery.o tcop/utility.o tsearch/ts_locale.o tsearch/ts_parse.o tsearch/wparser.o tsearch/wparser_def.o tsearch/dict.o tsearch/dict_simple.o tsearch/dict_synonym.o tsearch/dict_thesaurus.o tsearch/dict_ispell.o tsearch/regis.o tsearch/spell.o tsearch/to_tsany.o tsearch/ts_selfuncs.o tsearch/ts_typanalyze.o tsearch/ts_utils.o utils/adt/acl.o utils/adt/amutils.o utils/adt/arrayfuncs.o utils/adt/array_expanded.o utils/adt/array_selfuncs.o utils/adt/array_typanalyze.o utils/adt/array_userfuncs.o utils/adt/arrayutils.o utils/adt/ascii.o utils/adt/bool.o utils/adt/cash.o utils/adt/char.o utils/adt/cryptohashes.o utils/adt/date.o utils/adt/datetime.o utils/adt/datum.o utils/adt/dbsize.o utils/adt/domains.o utils/adt/encode.o utils/adt/enum.o utils/adt/expandeddatum.o utils/adt/expandedrecord.o utils/adt/float.o utils/adt/format_type.o utils/adt/formatting.o utils/adt/genfile.o utils/adt/geo_ops.o utils/adt/geo_selfuncs.o utils/adt/geo_spgist.o utils/adt/inet_cidr_ntop.o utils/adt/inet_net_pton.o utils/adt/int.o utils/adt/int8.o utils/adt/json.o utils/adt/jsonb.o utils/adt/jsonb_gin.o utils/adt/jsonb_op.o utils/adt/jsonb_util.o utils/adt/jsonfuncs.o utils/adt/jsonpath_gram.o utils/adt/jsonpath.o utils/adt/jsonpath_exec.o utils/adt/like.o utils/adt/like_support.o utils/adt/lockfuncs.o utils/adt/mac.o utils/adt/mac8.o utils/adt/misc.o utils/adt/name.o utils/adt/network.o utils/adt/network_gist.o utils/adt/network_selfuncs.o utils/adt/network_spgist.o utils/adt/numeric.o utils/adt/numutils.o utils/adt/oid.o utils/adt/oracle_compat.o utils/adt/orderedsetaggs.o utils/adt/partitionfuncs.o utils/adt/pg_locale.o utils/adt/pg_lsn.o utils/adt/pg_upgrade_support.o utils/adt/pgstatfuncs.o utils/adt/pseudotypes.o utils/adt/quote.o utils/adt/rangetypes.o utils/adt/rangetypes_gist.o utils/adt/rangetypes_selfuncs.o utils/adt/rangetypes_spgist.o utils/adt/rangetypes_typanalyze.o utils/adt/regexp.o utils/adt/regproc.o utils/adt/ri_triggers.o utils/adt/rowtypes.o utils/adt/ruleutils.o utils/adt/selfuncs.o utils/adt/tid.o utils/adt/timestamp.o utils/adt/trigfuncs.o utils/adt/tsginidx.o utils/adt/tsgistidx.o utils/adt/tsquery.o utils/adt/tsquery_cleanup.o utils/adt/tsquery_gist.o utils/adt/tsquery_op.o utils/adt/tsquery_rewrite.o utils/adt/tsquery_util.o utils/adt/tsrank.o utils/adt/tsvector.o utils/adt/tsvector_op.o utils/adt/tsvector_parser.o utils/adt/txid.o utils/adt/uuid.o utils/adt/varbit.o utils/adt/varchar.o utils/adt/varlena.o utils/adt/version.o utils/adt/windowfuncs.o utils/adt/xid.o utils/adt/xml.o utils/cache/attoptcache.o utils/cache/catcache.o utils/cache/evtcache.o utils/cache/inval.o utils/cache/lsyscache.o utils/cache/partcache.o utils/cache/plancache.o utils/cache/relcache.o utils/cache/relmapper.o utils/cache/relfilenodemap.o utils/cache/spccache.o utils/cache/syscache.o utils/cache/ts_cache.o utils/cache/typcache.o utils/error/assert.o utils/error/elog.o utils/fmgr/dfmgr.o utils/fmgr/fmgr.o utils/fmgr/funcapi.o utils/hash/dynahash.o utils/hash/hashfn.o utils/hash/pg_crc.o utils/init/globals.o utils/init/miscinit.o utils/init/postinit.o utils/mb/encnames.o utils/mb/conv.o utils/mb/mbutils.o utils/mb/wchar.o utils/mb/wstrcmp.o utils/mb/wstrncmp.o utils/misc/guc.o utils/misc/help_config.o utils/misc/pg_config.o utils/misc/pg_controldata.o utils/misc/pg_rusage.o utils/misc/ps_status.o utils/misc/queryenvironment.o utils/misc/rls.o utils/misc/sampling.o utils/misc/superuser.o utils/misc/timeout.o utils/misc/tzparser.o utils/mmgr/aset.o utils/mmgr/dsa.o utils/mmgr/freepage.o utils/mmgr/generation.o utils/mmgr/mcxt.o utils/mmgr/memdebug.o utils/mmgr/portalmem.o utils/mmgr/slab.o utils/resowner/resowner.o utils/sort/logtape.o utils/sort/sharedtuplestore.o utils/sort/sortsupport.o utils/sort/tuplesort.o utils/sort/tuplestore.o utils/time/combocid.o utils/time/snapmgr.o utils/fmgrtab.o ../../src/timezone/localtime.o ../../src/timezone/strftime.o ../../src/timezone/pgtz.o jit/jit.o ../../src/port/libpgport_srv.a ../../src/common/libpgcommon_srv.a -L../../src/port -L../../src/common -Wl,--as-needed -Wl,-rpath,'/usr/local/pgsql/lib',--enable-new-dtags -Wl,-E -lpthread -lrt -lcrypt -ldl -lm -o postgres
As documented by llvm-slicer, I should link the bitcodes together with llvm-link (e.g., llvm-link bitcode1.bc bitcode2.bc ... -o bitcode.bc) to get something like postgres.bc. But I only know how to produce the .bc file for each .c file (via -emit-llvm); and the very-long command above contains many other options (e.g., -lm -L ...) and some .a files, so simply replace .o files with .bc files seems not work.
Question
So I want to know how to get postgres.bc?
Thanks!
Solution: whole-program-llvm.
It provides tools for building whole-program (or whole-library) LLVM bitcode files from an unmodified C or C++ source package. It currently runs on *nix platforms such as Linux, FreeBSD, and Mac OS X.

LLD vs LD Linker Script Discrepancy

I'm moving a project from LD to LLD. An error has cropped up which appears due to the lack of global expression support in LLD. Are variables supported like this?
An simplified example of something that works in LD:
example.ld
_Flash_Origin = 0x01000000;
_App_Length = 16K;
_App_Origin = _Flash_Origin;
MEMORY
{
APP(rx) : ORIGIN = _App_Origin, LENGTH = _App_Length
}
The error is symbol not found: _App_Length. I'm looking for the reason this occurs only in LLD.
The args provided are as follows:
--gc-sections (list of object files...) -Bstatic -L(big path...)clang/10.0.1/lib/baremetal -T example.ld -T sections.ld -o output.elf

Errors in creating Python interface for multiple C++ files in a shared library

I have two c++ files named as "animal.cpp" and "zoo.cpp". These files are compiled as a shared library "zoo.so". I want to access the functions defined in these files from Python interpreter.
However, I am getting errors. I tried to do some changes but getting different kind of errors. I hope expert of Boost-Python may guide me in solving these issues.
Note: To keep the problem simple, I have not used classes, otherwise I could easily make classes of "animal" and "zoo".
I want to access both files function from Python.
Any guidance will be highly appreciated.
Thanks,
animal.cpp
+++++++++++
/*
* This is the C++ function we write and want to expose to Python.
*/
const std::string hello_animal() {
return std::string("hello, animal");
}
/*
* This is the C++ function we write and want to expose to Python.
*/
const std::string getname_animal() {
std::string input;
std::cout<<"Please enter your favorit animal name: ";
std::getline(std::cin,input);
return std::string("Your favorit animal name is: ").append(input);
}
/*
* This is a macro Boost.Python provides to signify a Python extension module.
*/
BOOST_PYTHON_MODULE(animal) {
// An established convention for using boost.python.
using namespace boost::python;
// Expose the function hello_animal().
def("hello_animal", hello_animal);
// Expose the function getname_animal().
def("getname_animal", getname_animal);
}
zoo.cpp
++++++++
/*
* This is the C++ function we write and want to expose to Python.
*/
const std::string hello_zoo() {
return std::string("hello, zoo");
}
/*
* This is the C++ function we write and want to expose to Python.
*/
const std::string getname_zoo() {
std::string input;
std::cout<<"Please enter your favorit zoo name: ";
std::getline(std::cin,input);
return std::string("Your favorit zoo name is: ").append(input);
}
/*
* This is a macro Boost.Python provides to signify a Python extension module.
*/
BOOST_PYTHON_MODULE(zoo) {
// An established convention for using boost.python.
using namespace boost::python;
// Expose the function hello_zoo().
def("hello_zoo", hello_zoo);
// Expose the function getname_zoo().
def("getname_zoo", getname_zoo);
}
I have created a shared library using following command:
g++ -shared -o zoo.so -fPIC zoo.cpp animal.cpp -lboost_python -lpython2.7 -I/usr/include/python2.7
Python Interpreter Commands and output:
import zoo
zoo.getname_zoo()
Please enter your favorit zoo name: zoo
'Your favorit zoo name is: zoo'
zoo.getname_animal()
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'module' object has no attribute 'getname_animal'
When I make following changes in animal.cpp file, I get different error.
BOOST_PYTHON_MODULE(zoo) {
instead of
BOOST_PYTHON_MODULE(animal) {
On compilation I get following error:
[root#localhost zooexample]# g++ -shared -o zoo.so -fPIC zoo.cpp animal.cpp -lboost_python -lpython2.7 -I/usr/include/python2.7
/tmp/cci4WKrP.o: In function initzoo':
animal.cpp:(.text+0x15d): multiple definition ofinitzoo'
/tmp/cctaGDer.o:zoo.cpp:(.text+0x15d): first defined here
/tmp/cci4WKrP.o: In function init_module_zoo()':
animal.cpp:(.text+0x179): multiple definition ofinit_module_zoo()'
/tmp/cctaGDer.o:zoo.cpp:(.text+0x179): first defined here
collect2: error: ld returned 1 exit status
+++++++++++++++++++++++++++++UPDATED++++UPDATED+++++UPDATED+++++++++++++++
Considering the suggestion given by Dan for my previous issue. Now I have created a separate file pyintf.cpp containing the following code:
BOOST_PYTHON_MODULE(pyintf) {
def("hello_zoo", hello_zoo);
def("getname_zoo", getname_zoo);
def("hello_animal", hello_animal);
def("getname_animal", getname_animal);
}
but when I compile and create a shared library using the following command:
g++ -shared -o pyintf.so -fPIC pyintf.cpp -lboost_python -lpython2.7 -I/usr/include/python2.7
I get following error when I import the "pyintf" module in python.
import pyintf
Traceback (most recent call last):
File "", line 1, in
ImportError: ./pyintf.so: undefined symbol: _Z9hello_zoov
Can anyone tell what I am not doing correctly?
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
The issues were resolved by putting all methods which I wanted to expose in a single pyintf.cpp. The errors which I got after update were due to missing header files and source files.
Now, the above issue has resolved by adding header files (zoo.h, animal.h) and source files (zoo.cpp, animal.cpp) in the compilation command. g++ -shared -o pyintf.so -fPIC pyintf.cpp animal.h animal.cpp zoo.h zoo.cpp -lboost_python -lpython2.7 -I/usr/include/python2.7
Thanks Dan for corrections.

Gtkbuilder error

I have installed GTK+- 2.10.14 with directFB backend for my powerpc target board, i could able to run the example application in my target board and see the gui comes up in target LCD.with that i started creating GUI using glade but while working on Glade to create my own GUI i found that glade required gtkbuildet to compile a .glade file. the gtkbuilder is available from version GTK+-2.12.0, so installed again the GTK+-2.12.0 and fallowed procedure say in this tutorial.
My program as follows:
#include<gtk/gtk.h>
int
main( int argc,char **argv )
{
GtkBuilder *builder;
GtkWidget *window;
GError *error = NULL;
/* Init GTK+ */
gtk_init( &argc, &argv );
/* Create new GtkBuilder object */
builder = gtk_builder_new();
/* Load UI from file. If error occurs, report it and quit application.
* * Replace "tut.glade" with your saved project. */
if( ! gtk_builder_add_from_file( builder, "graph.glade", &error ) )
{
g_warning( "%s", error->message );
g_free( error );
return( 1 );
}
/* Get main window pointer from UI */
window = GTK_WIDGET( gtk_builder_get_object( builder, "window1" ) );
/* Connect signals */
gtk_builder_connect_signals( builder, NULL );
/* Destroy builder, since we don't need it anymore */
g_object_unref( G_OBJECT( builder ) );
/* Show window. All other widgets are automatically shown by GtkBuilder */
gtk_widget_show( window );
/* Start main loop */
gtk_main();
return( 0 );
}
Now when I compile the above program I struck up with as error as below:
powerpc-linux-gnu-gcc progressbar.c -o progressbar -pthread -I/opt/gtkdfb/usr/local/include/glib-2.0 -I/opt/gtkdfb/usr/local/lib/glib-2.0/include -I/opt/gtkdfb/usr/local/include/pango-1.0 -I/opt/gtkdfb/usr/local/include/cairo -I/opt/gtkdfb/usr/local/include -I/opt/gtkdfb/usr/local/freetype2 -I/opt/gtkdfb/usr/local/libpng12 -I/opt/gtkdfb/usr/local/includegtk-2.0 -D_REENTRANT -D_GNU_SOURCE -I/opt/gtkdfb/usr/include/directfb -L/opt/gtkdfb/usr/local/lib -ldirectfb -lfusion -ldirect -lpthread -ldl -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lxml2 -lpng12 -lgthread-2.0 -lgtk-directfb-2.0 -lffi -lz -lm `pkg-config gtk+-2.0 --cflags --libs`
/tmp/ccZ9fkFp.o: In function `main':
progressbar.c:(.text+0x3c): undefined reference to `gtk_builder_new'
progressbar.c:(.text+0x58): undefined reference to `gtk_builder_add_from_file'
progressbar.c:(.text+0xb0): undefined reference to `gtk_builder_get_object'
progressbar.c:(.text+0xd8): undefined reference to `gtk_builder_connect_signals'
collect2: ld returned 1 exit status
make: *** [helloworld] Error 1
Please help me to come out of this error.
When there was no GtkBuilder, libglade was used instead. You must use a glade version that supports both GTK+2 and libglade (the 3.8 branch fits the bill).
Do not try to use the directFB back-end on newer GTK+: it was actively maintained by a developer of the Debian installer but it has been abandoned since a long time.
My guess is that pkg-config is still pointing to the old 2.10 version. I also don't understand why you have pkg-config gtk+-2.0 --cflags --libs and also provide all the GCC command line arguments. That is supposed to be the job of pkg-config.

Extending Perl is breaking dynamic loading

I'm trying to compile an XS into perl [ed(ikegami): which is to say he's using ::MakeMaker's make perl to create a perl with a C vendor library statically linked in ] but when I do, the new version of perl does not support dynamic loading of modules. Any time I try to run perl code that has something like use Socket (or any other module), I get:
Can't load module Socket, dynamic loading not available in this perl.
Is there a compiler/linker switch I'm setting incorrectly or something? All of this was compiled back in 1998 and again in 2004 on a different box (hpux old on PA-RISC), but we're moving to a new box (hpux11 itanium) and I'm hitting the wall.
Here's is my Makefile.PL:
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
'NAME' => 'Udtutil',
'VERSION_FROM' => 'Udtutil.pm', # finds $VERSION
'LIBS' => '-L/usr/ud/PFUSION/Udtutil -L/usr/ud/lib -lapidummy ' .
'-lshare -ludsql -ludmach -lbasic ' .
'-lperf -lret1 -lides -lpipe -lfunc -lndx -lrep -lshm ' .
'-lmglm -lulc -lglm -ltpmem2 -lcmn ' .
'-llicn -ludus -lunix -lbci -lunirpc -lxmldl -leda ' .
'-lsslU2097e -lcryptoU2097e ' .
'-lodbc -lstd_v2 -lstream -lCsup -lpthread -lm -lcl ' .
'-ldld ' .
'-lnfaclnt -lodsdummy -lcl ' .
'-lCsup -lcl -lelf -lm -lcurses -lsec -lpam ',
'INC' => '-I/usr/ud/include', # e.g., '-I/usr/include/other'
'OPTIMIZE' => '-O -Ae +DD64 -q -z +u4 -w ',
'LINKTYPE' => 'dynamic',
'OBJECT' => '$(BASEEXT)$(OBJ_EXT) funchead.o interfunc.o callcf.o efs_init.o',
);
Here's my .xs file, Udtutil.xs
#ifdef __cplusplus
extern "C" {
#endif
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include "/usr/ud/include/share.h"
#include "/opt/iibase/PFUSION/Udtutil/udtutil.h"
#ifdef __cplusplus
}
#endif
extern int U_IGNSIGSET;
extern int Iflags[2];
#if OS_NT
#define U_backsig(ignsigcnt) { if (((U_IGNSIGSET=(ignsigcnt)) == 0) && (Iflags[0] || Iflags[1])) U_sig_resend(); if (!U_IGNSIGSET && pU_sigflags && U_sigflags) NT_sig_kill(); }
#else
#define U_backsig(ignsigcnt) { if (((U_IGNSIGSET=(ignsigcnt)) == 0) && (Iflags[0] || Iflags[1])) U_sig_resend(); }
#endif
MODULE = Udtutil PACKAGE = Udtutil
int startudt(value1,value2)
int value1
int value2
CODE:
int jmpret, sat;
U_SET_JMP(jmpret,sat);
if (jmpret) {
/* proceed with initialization */
udtcallbasic_init(value1,value2);
RETVAL = 1;
} else {
/* shutdown unibasic and return unsuccessful value */
udtcallbasic_done(1);
RETVAL = 0;
}
OUTPUT:
RETVAL
void stopudt(status)
int status
CODE:
udtcallbasic_done(status);
void calludt(progname, argcount, ...)
char * progname
int argcount
PPCODE:
char * returnval;
int paramspassed = 0;
int status = 0;
char ** arglist = NULL;
int i;
if (argcount + 2 == items) {
/* build the C array from the Perl array */
paramspassed = 1;
arglist = (char **)malloc(argcount);
for (i = 0; i < argcount; i++) {
arglist[i] = (char *)malloc(sv_len(ST(i+2))+1);
strcpy(arglist[i], SvPV(ST(i+2),PL_na));
}
/* make the call into the database */
status = U_callbas(&returnval, progname, argcount, arglist);
for (i = 0; i < argcount; i++) {
free(arglist[i]);
}
free(arglist);
/* EXTEND(sp, 2); */
XPUSHs(sv_2mortal(newSViv(paramspassed)));
XPUSHs(sv_2mortal(newSViv(status)));
if (status == 0) {
/* EXTEND(sp, 1); */
XPUSHs(sv_2mortal(newSVpv(returnval, 0)));
free(returnval);
}
} else {
/* EXTEND(sp, 1); */
XPUSHs(sv_2mortal(newSViv(paramspassed)));
}
When I run perl Makefile.PL, everything looks good:
> perl Makefile.PL
Checking if your kit is complete...
Looks good
Writing Makefile for Udtutil
Writing MYMETA.yml
When I run make or make perl, everything goes well and it creates a new local perl binary.
However, when I execute ./perl mytest.pl, if mytest.pl *use*s any modules, I get:
Can't load module Socket, dynamic loading not available in this perl.
Any suggestions on how I can compile this new perl and still keep dynamic loading working?
ADDITIONAL INFO:
Here is config data from the old box (the one that works):
> perl -V:usedl
usedl='define';
> perl -V
Summary of my perl5 (5.0 patchlevel 4 subversion 4) configuration: Platform:
osname=hpux, osvers=10, archname=PA-RISC2.0
uname='hp-ux autocrft b.10.20 u 9000893 341130351 unlimited-user license '
hint=recommended, useposix=true, d_sigaction=define
bincompat3=y useperlio=undef d_sfio=undef Compiler:
cc='cc', optimize='-O', gccversion=
cppflags='-D_HPUX_SOURCE -Aa'
ccflags ='-D_HPUX_SOURCE -Aa'
stdchar='unsigned char', d_stdstdio=define, usevfork=false
voidflags=15, castflags=0, d_casti32=define, d_castneg=define
intsize=4, alignbytes=8, usemymalloc=y, prototype=define Linker and Libraries:
ld='ld', ldflags ='-L/usr/local/lib -L/usr/ud/lib'
libpth=/usr/local/lib /usr/lib/pa1.1 /usr/ud/lib /lib /usr/lib /usr/ccs/lib
libs=-lnet -lnsl_s -lndbm -ldld -lm -lc -lndir -lcrypt
libc=/lib/libc.sl, so=sl
useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_hpux.xs, dlext=sl, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-B,deferred '
cccdlflags='+z', lddlflags='-b -L/usr/local/lib -L/usr/ud/lib'
Characteristics of this binary (from libperl): Built under hpux
Compiled at May 7 1998 13:59:51 #INC:
/opt/perl5/lib/PA-RISC2.0/5.00404
/opt/perl5/lib
/opt/perl5/lib/site_perl/PA-RISC2.0
/opt/perl5/lib/site_perl
.
...and here is config data from the new box (the one that is not working):
> ./perl -V:usedl
usedl='define';
> ./perl -V
Summary of my perl5 (revision 5 version 14 subversion 2) configuration:
Platform:
osname=hpux, osvers=11.31, archname=IA64.ARCHREV_0-LP64
uname='hp-ux autocrft b.11.31 u ia64 1650208369 unlimited-user license '
config_args=''
hint=previous, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef Compiler:
cc='cc', ccflags ='+DD64 -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='+O2 +Onolimit',
cppflags='-Aa -D__STDC_EXT__ -D_HPUX_SOURCE +DD64 -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings -I/usr/local/include +DD64 -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarn ings -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccversion='B3910B', gccversion='', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=87654321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define Linker and Libraries:
ld='/usr/bin/ld', ldflags =' -L/usr/lib/hpux64'
libpth=/usr/lib/hpux64
libs=-L/usr/lib/hpux64 -lnsl -lnm -ldl -ldld -lm -lsec -lc
perllibs=-lnsl -lnm -ldl -ldld -lm -lsec -lc
libc=/usr/lib/hpux64/libc.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_hpux.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-B,deferred '
cccdlflags='+DD64', lddlflags='-b +vnocompatwarnings'
Characteristics of this binary (from libperl):
Compile-time options: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP
PERL_PRESERVE_IVUV USE_64_BIT_ALL USE_64_BIT_INT
USE_LARGE_FILES USE_PERLIO USE_PERL_ATOF Built under hpux
Compiled at Apr 13 2012 09:27:33
#INC:
/opt/iibase/perl/lib/site_perl/5.14.2/IA64.ARCHREV_0-LP64
/opt/iibase/perl/lib/site_perl/5.14.2
/opt/iibase/perl/lib/5.14.2/IA64.ARCHREV_0-LP64
/opt/iibase/perl/lib/5.14.2
.
I don't know if there is anything useful in this email that I collected and preserved as part of the background information for Perl's DBD::Informix module.
Date: Wed, 13 Aug 1997 13:02:04 -0500 (CDT)
From: "Kent S. Gordon" [email deleted]
Subject: Re: Easy way to force static Informix libraries with DBD:Informix
>> "kgor" == Kent S Gordon <kgor#inetspace.com> wrote:
> Is there a easy way to create a DBD:Informix that uses static Informix
> libraries, but dynamic system libraries for everything else.
I have succeeded in building a perl with DBD:Informix that uses dynamic
loading for everything except DBD:Informix and DBI. I got a runtime error of
not being able to find the symbol of boot_DBI if DBI was also not
statically built into perl. Here is a short discription of what I did.
1) Built perl 5.004_2 normally.
2) Installed perl.
3) Built DBI statically (make static).
4) Installed DBI (make install). This is not just the install of the perl
binary, since DBI.a is needed later.
5) Changed DBD Makefile.pl to call esql -static and esql -static -libs
instead of esql and esql -libs.
6) Created DBD Makefile using perl Makefile.PL.
7) Built DBD statically (make static and make perl, etc.)
8) The make test_static failed, due to wanting to create a dynamic object
(Informix.sl failed due to trying fixup a symbol)
9) Installed with make -k install to get pass error creating Informix.sl,
while still installing Informix.pm (could not find a special install
for static perl.
10) Installed new perl executable. It seems to work after some initial
test.
Kent S. Gordon
Senior Software Engineer
iNetSpace Co.
[Phone and email deleted]
I noted at the time that Kent must be building on HP-UX because of the references to Informix.sl. I think there is nothing useful in here, but it is the only extra information I have on building statically linked versions of Perl. As you can see, it is close to 15 years old.
I wonder if Perl 5.14.x still fully supports and tests statically linked modules?
Don't know if that would be of much help but you can take a look at App::Staticperl. I was able to build DBI and DBD::Informix with it in Solaris, maybe it will work in HP-UX as well.
From perlxstut man page
Dynamic Loading versus Static Loading
It is commonly thought that if a system does not have the capability to dynamically load a library, you cannot build XSUBs. This is incorrect. You can build them, but you must link the XSUBs subroutines with the rest of Perl, creating a new executable. This situation is similar to Perl 4.
This tutorial can still be used on such a system. The XSUB build mechanism will check the system and build a dynamically-loadable library if possible, or else a static library and then, optionally, a new statically-linked executable with that static library linked in.
Should you wish to build a statically-linked executable on a system which can dynamically load libraries, you may, in all the following examples, where the command "make " with no arguments is executed, run the command "make perl " instead.
If you have generated such a statically-linked executable by choice, then instead of saying "make test ", you should say "make test_static ". On systems that cannot build dynamically-loadable libraries at all, simply saying "make test " is sufficient.
It says if you use the line command 'make perl' then you are telling it to build statically.