[odb-users] Linker error building odb on mac 12

Cunliffe, Sam s.cunliffe at ucl.ac.uk
Tue Sep 20 10:40:54 EDT 2022


Hello,

I'm following along with these
https://codesynthesis.com/products/odb/doc/install-build2.xhtml#macos-odb
...instructions. I am at the build odb step 3.2 and I get a linker error.

> sw_vers 
ProductName:	macOS
ProductVersion:	12.6
BuildVersion:	21G115

> arch
arm64

> bpkg --version                              
bpkg 0.15.0
libbpkg 0.15.0
libbutl 0.15.0
Copyright (c) 2014-2022 the build2 authors.
This is free software released under the MIT license.

> g++-12 --version
g++-12 (Homebrew GCC 12.2.0) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

> bpkg build odb at https://pkg.cppget.org/1/beta
### full output pasted below but the errors are... ###
ld: warning: -undefined dynamic_lookup may not work with chained fixups
0  0x1022241a0  __assert_rtn + 140
1  0x1020aba8c  mach_o::relocatable::Parser<arm64>::parse(mach_o::relocatable::ParserOptions const&) + 4536
2  0x10207dd38  mach_o::relocatable::Parser<arm64>::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const&) + 148
3  0x1020c8180  archive::File<arm64>::makeObjectFileForMember(archive::File<arm64>::Entry const*) const + 1084
4  0x1020c7ac8  archive::File<arm64>::File(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, archive::ParserOptions const&) + 856
5  0x1020c002c  archive::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, archive::ParserOptions const&) + 388
6  0x1020e66d0  ld::tool::InputFiles::makeFile(Options::FileInfo const&, bool) + 2016
7  0x1020e9360  ___ZN2ld4tool10InputFilesC2ER7Options_block_invoke + 56
8  0x1b81741f4  _dispatch_client_callout2 + 20
9  0x1b8187954  _dispatch_apply_invoke + 224
10  0x1b81741b4  _dispatch_client_callout + 20
11  0x1b8185a04  _dispatch_root_queue_drain + 680
12  0x1b8186104  _dispatch_worker_thread2 + 164
13  0x1b8334324  _pthread_wqthread + 228
A linker snapshot was created at:
	/tmp/odb.so-2022-09-20-153316.ld-snapshot
ld: Assertion failed: (_file->_atomsArrayCount == computedAtomCount && "more atoms allocated than expected"), function parse, file macho_relocatable_file.cpp, line 2061.
collect2: error: ld returned 1 exit status
info: failed to update dir{odb-2.5.0-b.23/}

build2 seemed to install fine, and I have tried adding paths to homebrew libs and includes (as suggested). 
Anything I'm missing?

Thanks a lot,
Sam.

----//-----

Here's the full output from the building.

> bpkg build odb at https://pkg.cppget.org/1/beta 
added pkg:cppget.org/beta
fetching pkg:cppget.org/beta
warning: authenticity of the certificate for repository pkg:cppget.org/beta cannot be established
certificate is for **cppget.org, "Code Synthesis" <admin at cppget.org>
certificate SHA256 fingerprint:
70:64:FE:E4:E0:F3:60:F1:B4:51:E1:FA:12:5C:E0:B3:DB:DF:96:33:39:B9:2E:E5:C2:68:63:4C:A6:47:39:43
trust this certificate? [y/n] y
fetching pkg:cppget.org/testing (complements pkg:cppget.org/beta)
fetching pkg:cppget.org/stable (complements pkg:cppget.org/testing)
  new libstudxml/1.1.0-b.10 (required by odb)
  new libcutl/1.11.0-b.9 (required by odb)
  new odb/2.5.0-b.23
continue? [Y/n] y
libstudxml-1.1.0-b.10.tar.gz:
##################################################################################################################################################### 100.0%
fetched libstudxml/1.1.0-b.10
unpacked libstudxml/1.1.0-b.10
libcutl-1.11.0-b.9.tar.gz:
##################################################################################################################################################### 100.0%
fetched libcutl/1.11.0-b.9
unpacked libcutl/1.11.0-b.9
odb-2.5.0-b.23.tar.gz:
##################################################################################################################################################### 100.0%
fetched odb/2.5.0-b.23
unpacked odb/2.5.0-b.23
configured libstudxml/1.1.0-b.10
configured libcutl/1.11.0-b.9
configured odb/2.5.0-b.23
version.in libstudxml-1.1.0-b.10/libstudxml/version.hxx.in
version.in libcutl-1.11.0-b.9/libcutl/version.hxx.in
c++ odb-2.5.0-b.23/odb/cxx{odb}
c++ odb-2.5.0-b.23/odb/cxx{common-query}
c++ odb-2.5.0-b.23/odb/relational/pgsql/cxx{schema}
c++ odb-2.5.0-b.23/odb/cxx{include}
c++ odb-2.5.0-b.23/odb/relational/cxx{model}
c++ odb-2.5.0-b.23/odb/relational/oracle/cxx{model}
c++ odb-2.5.0-b.23/odb/relational/cxx{validator}
c++ odb-2.5.0-b.23/odb/relational/cxx{common-query}
c++ odb-2.5.0-b.23/odb/relational/oracle/cxx{inline}
c++ odb-2.5.0-b.23/odb/relational/oracle/cxx{header}
c++ odb-2.5.0-b.23/odb/relational/oracle/cxx{context}
c++ odb-2.5.0-b.23/odb/relational/oracle/cxx{schema}
c++ odb-2.5.0-b.23/odb/relational/oracle/cxx{source}
c++ odb-2.5.0-b.23/odb/relational/oracle/cxx{common}
c++ odb-2.5.0-b.23/odb/relational/mssql/cxx{context}
c++ odb-2.5.0-b.23/odb/relational/sqlite/cxx{model}
c++ odb-2.5.0-b.23/odb/relational/sqlite/cxx{inline}
c++ odb-2.5.0-b.23/odb/relational/sqlite/cxx{header}
c++ odb-2.5.0-b.23/odb/relational/sqlite/cxx{context}
c++ odb-2.5.0-b.23/odb/cxx{lookup}
c++ odb-2.5.0-b.23/odb/relational/sqlite/cxx{schema}
c++ odb-2.5.0-b.23/odb/cxx{instance}
c++ odb-2.5.0-b.23/odb/relational/sqlite/cxx{source}
c++ odb-2.5.0-b.23/odb/relational/sqlite/cxx{common}
c++ odb-2.5.0-b.23/odb/relational/cxx{inline}
c++ odb-2.5.0-b.23/odb/cxx{cxx-lexer}
c++ odb-2.5.0-b.23/odb/relational/mysql/cxx{model}
c++ odb-2.5.0-b.23/odb/relational/mysql/cxx{inline}
c++ odb-2.5.0-b.23/odb/semantics/relational/cxx{key}
c++ odb-2.5.0-b.23/odb/semantics/relational/cxx{deferrable}
c++ odb-2.5.0-b.23/odb/semantics/relational/cxx{model}
c++ odb-2.5.0-b.23/odb/relational/mysql/cxx{header}
c++ odb-2.5.0-b.23/odb/relational/mysql/cxx{context}
c++ odb-2.5.0-b.23/odb/relational/mysql/cxx{schema}
c++ odb-2.5.0-b.23/odb/relational/mysql/cxx{source}
c++ odb-2.5.0-b.23/odb/semantics/relational/cxx{changelog}
c++ odb-2.5.0-b.23/odb/relational/mysql/cxx{common}
c++ odb-2.5.0-b.23/odb/semantics/relational/cxx{column}
c++ odb-2.5.0-b.23/odb/relational/cxx{header}
c++ odb-2.5.0-b.23/odb/relational/cxx{processor}
c++ odb-2.5.0-b.23/odb/relational/cxx{context}
c++ odb-2.5.0-b.23/odb/semantics/cxx{fundamental}
c++ odb-2.5.0-b.23/odb/relational/pgsql/cxx{model}
c++ odb-2.5.0-b.23/odb/relational/pgsql/cxx{inline}
c++ odb-2.5.0-b.23/odb/semantics/cxx{enum}
c++ odb-2.5.0-b.23/odb/relational/pgsql/cxx{header}
c++ odb-2.5.0-b.23/odb/semantics/cxx{union-template}
c++ odb-2.5.0-b.23/odb/semantics/cxx{elements}
c++ odb-2.5.0-b.23/odb/relational/pgsql/cxx{context}
c++ odb-2.5.0-b.23/odb/relational/pgsql/cxx{source}
c++ odb-2.5.0-b.23/odb/relational/pgsql/cxx{common}
c++ odb-2.5.0-b.23/odb/relational/cxx{schema-source}
c++ odb-2.5.0-b.23/odb/relational/cxx{changelog}
c++ odb-2.5.0-b.23/odb/cxx{diagnostics}
c++ odb-2.5.0-b.23/odb/cxx{location}
c++ odb-2.5.0-b.23/odb/relational/cxx{schema}
c++ odb-2.5.0-b.23/odb/traversal/relational/cxx{changelog}
c++ odb-2.5.0-b.23/odb/relational/cxx{source}
c++ odb-2.5.0-b.23/odb/relational/cxx{common}
c++ odb-2.5.0-b.23/odb/relational/mssql/cxx{model}
c++ odb-2.5.0-b.23/odb/traversal/cxx{enum}
c++ odb-2.5.0-b.23/odb/relational/mssql/cxx{inline}
c++ odb-2.5.0-b.23/odb/traversal/cxx{elements}
c++ odb-2.5.0-b.23/odb/relational/mssql/cxx{header}
c++ odb-2.5.0-b.23/odb/relational/mssql/cxx{schema}
c++ odb-2.5.0-b.23/odb/cxx{processor}
c++ odb-2.5.0-b.23/odb/relational/mssql/cxx{source}
c++ odb-2.5.0-b.23/odb/relational/mssql/cxx{common}
c++ odb-2.5.0-b.23/odb/cxx{parser}
c++ odb-2.5.0-b.23/odb/cxx{validator}
c++ odb-2.5.0-b.23/odb/cxx{option-functions}
c++ odb-2.5.0-b.23/odb/cxx{plugin}
c++ odb-2.5.0-b.23/odb/cxx{pragma}
c++ odb-2.5.0-b.23/odb/cxx{sql-token}
c++ odb-2.5.0-b.23/odb/semantics/relational/cxx{index}
c++ libstudxml-1.1.0-b.10/libstudxml/cxx{serializer}
c++ odb-2.5.0-b.23/odb/semantics/relational/cxx{primary-key}
c++ odb-2.5.0-b.23/odb/semantics/relational/cxx{changeset}
c libstudxml-1.1.0-b.10/libstudxml/details/expat/c{xmlparse}
c++ odb-2.5.0-b.23/odb/semantics/relational/cxx{foreign-key}
c++ odb-2.5.0-b.23/odb/semantics/relational/cxx{table}
c++ odb-2.5.0-b.23/odb/semantics/relational/cxx{elements}
c++ odb-2.5.0-b.23/odb/semantics/relational/cxx{name}
c libstudxml-1.1.0-b.10/libstudxml/details/genx/c{char-props}
c libstudxml-1.1.0-b.10/libstudxml/details/genx/c{genx}
c++ odb-2.5.0-b.23/odb/semantics/cxx{class}
c++ odb-2.5.0-b.23/odb/semantics/cxx{class-template}
c++ odb-2.5.0-b.23/odb/semantics/cxx{derived}
c libstudxml-1.1.0-b.10/libstudxml/details/expat/c{xmltok}
c++ odb-2.5.0-b.23/odb/semantics/cxx{unit}
c++ odb-2.5.0-b.23/odb/semantics/cxx{namespace}
c++ odb-2.5.0-b.23/odb/semantics/cxx{template}
c++ odb-2.5.0-b.23/odb/semantics/cxx{union}
c++ odb-2.5.0-b.23/odb/cxx{option-types}
c libstudxml-1.1.0-b.10/libstudxml/details/expat/c{xmlrole}
c++ odb-2.5.0-b.23/odb/cxx{inline}
c++ odb-2.5.0-b.23/odb/cxx{profile}
c++ odb-2.5.0-b.23/odb/traversal/relational/cxx{key}
c++ libstudxml-1.1.0-b.10/libstudxml/cxx{qname}
c++ odb-2.5.0-b.23/odb/traversal/cxx{class}
c++ odb-2.5.0-b.23/odb/traversal/cxx{class-template}
c++ libstudxml-1.1.0-b.10/libstudxml/cxx{value-traits}
c++ odb-2.5.0-b.23/odb/traversal/cxx{derived}
c++ libstudxml-1.1.0-b.10/libstudxml/cxx{parser}
c++ odb-2.5.0-b.23/odb/traversal/cxx{union-template}
c++ odb-2.5.0-b.23/odb/traversal/cxx{template}
c++ odb-2.5.0-b.23/odb/cxx{header}
c++ odb-2.5.0-b.23/odb/cxx{context}
ld libstudxml-1.1.0-b.10/libstudxml/libs{studxml}
c++ odb-2.5.0-b.23/odb/cxx{emitter}
c++ odb-2.5.0-b.23/odb/cxx{sql-lexer}
c++ libcutl-1.11.0-b.9/libcutl/re/cxx{re}
c++ odb-2.5.0-b.23/odb/cxx{source}
c++ odb-2.5.0-b.23/odb/cxx{common}
c++ odb-2.5.0-b.23/odb/cxx{generator}
c++ odb-2.5.0-b.23/odb/cxx{options}
c++ libcutl-1.11.0-b.9/libcutl/shared-ptr/cxx{base}
c++ libcutl-1.11.0-b.9/libcutl/cxx{exception}
c++ libcutl-1.11.0-b.9/libcutl/fs/cxx{path}
c++ libcutl-1.11.0-b.9/libcutl/fs/cxx{exception}
c++ libcutl-1.11.0-b.9/libcutl/fs/cxx{auto-remove}
c++ libcutl-1.11.0-b.9/libcutl/compiler/cxx{type-info}
c++ libcutl-1.11.0-b.9/libcutl/compiler/cxx{cxx-indenter}
c++ libcutl-1.11.0-b.9/libcutl/compiler/cxx{context}
ld libcutl-1.11.0-b.9/libcutl/libs{cutl}
ar odb-2.5.0-b.23/odb/libus{odb}
ld odb-2.5.0-b.23/odb/plugin{odb}
ld: warning: -undefined dynamic_lookup may not work with chained fixups
0  0x1022241a0  __assert_rtn + 140
1  0x1020aba8c  mach_o::relocatable::Parser<arm64>::parse(mach_o::relocatable::ParserOptions const&) + 4536
2  0x10207dd38  mach_o::relocatable::Parser<arm64>::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const&) + 148
3  0x1020c8180  archive::File<arm64>::makeObjectFileForMember(archive::File<arm64>::Entry const*) const + 1084
4  0x1020c7ac8  archive::File<arm64>::File(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, archive::ParserOptions const&) + 856
5  0x1020c002c  archive::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, archive::ParserOptions const&) + 388
6  0x1020e66d0  ld::tool::InputFiles::makeFile(Options::FileInfo const&, bool) + 2016
7  0x1020e9360  ___ZN2ld4tool10InputFilesC2ER7Options_block_invoke + 56
8  0x1b81741f4  _dispatch_client_callout2 + 20
9  0x1b8187954  _dispatch_apply_invoke + 224
10  0x1b81741b4  _dispatch_client_callout + 20
11  0x1b8185a04  _dispatch_root_queue_drain + 680
12  0x1b8186104  _dispatch_worker_thread2 + 164
13  0x1b8334324  _pthread_wqthread + 228
A linker snapshot was created at:
	/tmp/odb.so-2022-09-20-153316.ld-snapshot
ld: Assertion failed: (_file->_atomsArrayCount == computedAtomCount && "more atoms allocated than expected"), function parse, file macho_relocatable_file.cpp, line 2061.
collect2: error: ld returned 1 exit status
info: failed to update dir{odb-2.5.0-b.23/}



More information about the odb-users mailing list