[External]Re: [odb-users] New distribution pkgs for ODB

Montero, Antonio antonio.montero at carrier.com
Wed Mar 29 17:48:03 EDT 2023


Thank you for the response. I was able to build (cross compile) the corresponding pkgs.
Couple of items:

1- I was not successful in configuring the libodb-sqlite build to use an unpackaged version of libsqlite3 rather than pull the repo source and build from source.
It was not obvious in the documentation how to cleanly accomplish this. I tried with ?sys however that at the moment appears to default to think it is a system provided pkg and adds /usr/local paths to the compiler which then causes issues when cross compiling as it tries to pick up wchar.h from x86_64 when cross compiling for armv7. Per the documentation I attempted to specify the ?sys:sqlite3/<version> but that did not work either. It complained that it did not satisfied the dependency. I just ended up building using the build from source option which at the moment is good enough. Our application build system is Yocto based and sqlite3 is being built through yocto recipe and its different version hence why I wanted to link libodb-sqlite with that already installed version.

2- Is there a way to strip .so libs via build2 configuration? I could not find an option to cause 'strip --strip-all' to be called on the created '.so' libs

BR,
Antonio Montero
Staff Engineer, Gen Engrg, Panels NPD
Robust Design Lead (RDL) Systems,
Commercial Fire - Edwards&Barcelona
8985 Town Center Parkway
Bradenton, Florida 34202
email: antonio.montero at carrier.com


http://edwardsfiresafety.com




-----Original Message-----
From: Boris Kolpackov <boris at codesynthesis.com> 
Sent: Wednesday, March 29, 2023 3:56 AM
To: Tenneti, Rohith <Rohith.Tenneti2 at carrier.com>
Cc: odb-users at codesynthesis.com; Montero, Antonio <antonio.montero at carrier.com>
Subject: Re: [External]Re: [odb-users] New distribution pkgs for ODB

[You don't often get email from boris at codesynthesis.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

Tenneti, Rohith <Rohith.Tenneti2 at carrier.com> writes:

> How would one specify a prefix in the build2.config options when cross 
> compiling for another target so that the build/compile is able to 
> locate the headers and libs for the cross compile of libodb and 
> libodb-sqlite?

There is a note on cross-compiling at the beginning of the instructions.
If cross-compiling requires that you specify additional header and/or library search paths, then you can specify them with config.cc.poptions and config.cc.loptions, respectively. For example:

$ bpkg create -d libodb-gcc-aarch64 cc          \
  config.cxx=aarch64-linux-gnu-g++              \
  config.cc.coptions=-O3                        \
  config.cc.poptions=-I/opt/gcc-aarch64/include \
  config.cc.loptions=-L/opt/gcc-aarch64/lib     \
  config.install.root=/opt/gcc-aarch64          \
  config.install.sudo=sudo

You can specify multiple search paths like this:

config.cc.poptions="-I/opt/gcc-common/include -I/opt/gcc-aarch64/include"



More information about the odb-users mailing list