[solved] Re: ports-mgmt/pkg failing to link when cross-compiling with qemu
On Thu, 23 Jan 2014 20:38:51 +0100 "Christopher J. Ruwe" wrote: > When trying the instructions on > https://wiki.freebsd.org/QemuUserModeHowTo, I encountered a fairly > basic port (ports-mgmt/pkg) failing to link properly: > > [... - everything fine until here] > > cc -static -O -pipe -DPORTSDIR=\"/usr/ports\" -I../libpkg > -I/usr/ports/ports-mg/work/pkg-1.2.5/pkg/../external/expat/lib > -std=gnu99 -Qunused-arguments -Wsystemprototypes -Wmissing-prototypes > -Wpointer-arith -Wreturn-type -Wcast-qual -Wwritepts -Winline > -Wnested-externs -Wredundant-decls -Wold-style-definition > -Wmissing-int -static -o pkg-static add.o annotate.o audit.o > autoremove.o backup.o check.ock.o main.o plugins.o progressmeter.o > query.o register.o repo.o rquery.o update.otch.o shell.o stats.o ssh.o > -L/usr/ports/ports-mgmt/pkg/work/pkg-1.2.5/pkg/../lib -lcrypto -lmd > -lz -lbz2 -llzma -ljail -lelf -larchive -lsbuf -lfetch -lpt > > add.o: In function `exec_add': > add.c:(.text+0x11c): undefined reference to `pkgdb_access' > add.c:(.text+0x13c): undefined reference to `pkgdb_open' > add.c:(.text+0x164): undefined reference to `pkg_manifest_keys_new' > add.c:(.text+0x344): undefined reference to `pkg_fetch_file' > add.c:(.text+0x364): undefined reference to `pkg_add' > add.c:(.text+0x42c): undefined reference to `pkg_manifest_keys_free' > add.c:(.text+0x434): undefined reference to `pkgdb_close' > > > [ ... - they are all alike] > > > version.o: In function `print_version': > version.c:(.text+0x14fc): undefined reference to `pkg_get2' > version.c:(.text+0x1514): undefined reference to `pkg_version_cmp' > version.c:(.text+0x1590): undefined reference to `pkg_asprintf' > version.c:(.text+0x15a4): undefined reference to `pkg_asprintf' > version.c:(.text+0x1650): undefined reference to `pkg_printf' > which.o: In function `exec_which': [...] > > > Has anybody encountered something similar and would know how to fix > that? > > Thanks and cheers, The problem is trying to build ARMv6 32b-binaries on 64b amd64. Building on i386 works. Would it be possible to include that in the wiki (https://wiki.freebsd.org/QemuUserModeHowTo) Cheers, -- Christopher TZ: GMT + 1h GnuPG/GPG: 0xE8DE2C14 FreeBSD 9.2-STABLE #1 r256184: Thu Oct 10 19:12:54 CEST 2013 c...@dijkstra.cruwe.de:/usr/obj/usr/home/cjr/media/src/freebsd/base/stable/9/sys/GEN_WDTRACE Punctuation matters: "Lets eat Grandma." or "Lets eat, Grandma." - Punctuation saves lives. "A panda eats shoots and leaves." or "A panda eats, shoots, and leaves." - Punctuation teaches proper biology. "With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead." (RFC 1925) ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
ports-mgmt/pkg failing to link when cross-compiling with qemu
When trying the instructions on https://wiki.freebsd.org/QemuUserModeHowTo, I encountered a fairly basic port (ports-mgmt/pkg) failing to link properly: [... - everything fine until here] cc -static -O -pipe -DPORTSDIR=\"/usr/ports\" -I../libpkg -I/usr/ports/ports-mg/work/pkg-1.2.5/pkg/../external/expat/lib -std=gnu99 -Qunused-arguments -Wsystemprototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwritepts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wmissing-int -static -o pkg-static add.o annotate.o audit.o autoremove.o backup.o check.ock.o main.o plugins.o progressmeter.o query.o register.o repo.o rquery.o update.otch.o shell.o stats.o ssh.o -L/usr/ports/ports-mgmt/pkg/work/pkg-1.2.5/pkg/../lib -lcrypto -lmd -lz -lbz2 -llzma -ljail -lelf -larchive -lsbuf -lfetch -lpt add.o: In function `exec_add': add.c:(.text+0x11c): undefined reference to `pkgdb_access' add.c:(.text+0x13c): undefined reference to `pkgdb_open' add.c:(.text+0x164): undefined reference to `pkg_manifest_keys_new' add.c:(.text+0x344): undefined reference to `pkg_fetch_file' add.c:(.text+0x364): undefined reference to `pkg_add' add.c:(.text+0x42c): undefined reference to `pkg_manifest_keys_free' add.c:(.text+0x434): undefined reference to `pkgdb_close' [ ... - they are all alike] version.o: In function `print_version': version.c:(.text+0x14fc): undefined reference to `pkg_get2' version.c:(.text+0x1514): undefined reference to `pkg_version_cmp' version.c:(.text+0x1590): undefined reference to `pkg_asprintf' version.c:(.text+0x15a4): undefined reference to `pkg_asprintf' version.c:(.text+0x1650): undefined reference to `pkg_printf' which.o: In function `exec_which': which.c:(.text+0xe8): undefined reference to `pkgdb_open' which.c:(.text+0xf8): undefined reference to `pkgdb_close' which.c:(.text+0x18c): undefined reference to `pkgdb_query_which' which.c:(.text+0x1ac): undefined reference to `pkgdb_it_next' which.c:(.text+0x250): undefined reference to `pkg_printf' which.c:(.text+0x260): undefined reference to `pkg_printf' which.c:(.text+0x284): undefined reference to `pkg_printf' which.c:(.text+0x298): undefined reference to `pkgdb_it_next' which.c:(.text+0x2a8): undefined reference to `pkg_free' which.c:(.text+0x2b0): undefined reference to `pkgdb_it_free' which.c:(.text+0x2b8): undefined reference to `pkgdb_close' fetch.o: In function `exec_fetch': fetch.c:(.text+0xa4): undefined reference to `pkg_config_bool' fetch.c:(.text+0xb0): undefined reference to `pkg_config_bool' fetch.c:(.text+0x1e8): undefined reference to `pkgdb_set_case_sensitivity' fetch.c:(.text+0x2c0): undefined reference to `pkgdb_access' fetch.c:(.text+0x2e0): undefined reference to `pkgdb_access' fetch.c:(.text+0x314): undefined reference to `pkgdb_open' fetch.c:(.text+0x330): undefined reference to `pkg_jobs_new' fetch.c:(.text+0x34c): undefined reference to `pkg_jobs_set_repository' fetch.c:(.text+0x360): undefined reference to `pkg_jobs_set_flags' fetch.c:(.text+0x37c): undefined reference to `pkg_jobs_add' fetch.c:(.text+0x38c): undefined reference to `pkg_jobs_solve' fetch.c:(.text+0x39c): undefined reference to `pkg_jobs_count' fetch.c:(.text+0x418): undefined reference to `pkg_jobs_apply' fetch.c:(.text+0x420): undefined reference to `pkg_jobs_free' fetch.c:(.text+0x428): undefined reference to `pkgdb_close' shell.o: In function `exec_shell': shell.c:(.text+0x54): undefined reference to `pkgdb_cmd' stats.o: In function `exec_stats': stats.c:(.text+0xe8): undefined reference to `pkgdb_open' stats.c:(.text+0x120): undefined reference to `pkgdb_stats' stats.c:(.text+0x13c): undefined reference to `pkgdb_stats' stats.c:(.text+0x1cc): undefined reference to `pkg_repos_total_count' stats.c:(.text+0x1e8): undefined reference to `pkgdb_stats' stats.c:(.text+0x204): undefined reference to `pkgdb_stats' stats.c:(.text+0x220): undefined reference to `pkgdb_stats' stats.c:(.text+0x23c): undefined reference to `pkgdb_stats' stats.c:(.text+0x294): undefined reference to `pkgdb_close' ssh.o: In function `exec_ssh': ssh.c:(.text+0x98): undefined reference to `pkg_sshserve' cc: error: linker command failed with exit code 1 (use -v to see invocation) *** Error code 1 Stop. make[3]: stopped in /usr/ports/ports-mgmt/pkg/work/pkg-1.2.5/pkg *** Error code 1 Stop. make[2]: stopped in /usr/ports/ports-mgmt/pkg/work/pkg-1.2.5 *** Error code 1 Stop. make[1]: stopped in /usr/ports/ports-mgmt/pkg *** Error code 1 Stop. make: stopped in /usr/ports/ports-mgmt/pkg Has anybody encountered something similar and would know how to fix that? Thanks and cheers, -- Christopher TZ: GMT + 1h GnuPG/GPG: 0xE8DE2C14 FreeBSD 9.2-STABLE #1 r256184: Thu Oct 10 19:12:54 CEST 2013 c...@dijkstra.cruwe.de:/usr/obj/usr/home/cjr/media/src/freebsd/base/stable/9/sys/GEN_WDTRACE Punctuation matters: "Lets eat Grandma." or "Lets eat, Grandma." - Punctuation saves lives. "A panda eats shoots and leaves." or "A panda eats, shoots, and l