Skip to content

Build problems after merge of contribution 45

The merge of contribution 45 via !546 (merged) has introduced a dependency problem for lib_dec - it is currently not usable as a standalone library.

The following linker error occurs when trying to use lib_dec in an application other than IVAS_dec (tested at commit e15d8f5a, building with CMake):

Undefined symbols for architecture x86_64:
  "_deindex_sph_idx", referenced from:
      _ivas_qmetadata_raw_decode_dir_512 in liblib_dec.a(ivas_qmetadata_dec.c.o)
ld: symbol(s) not found for architecture x86_64

The error happens because deindex_sph_idx is used in lib_dec, but defined in lib_util, which is not a dependency of lib_dec. This problem goes unnoticed when building IVAS_dec because symbols from both lib_util and lib_dec are available in that case.

Best solution IMO would be to:

  1. Move deindex_sph_idx to some file in lib_dec
  2. Make deindex_sph_idx available in lib_util by making lib_dec a dependency of lib_util