Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DCCL fails to cross compile (building on Yocto) #123

Open
bahaeg123 opened this issue Aug 11, 2023 · 1 comment
Open

DCCL fails to cross compile (building on Yocto) #123

bahaeg123 opened this issue Aug 11, 2023 · 1 comment

Comments

@bahaeg123
Copy link

I'm trying to compile DCCL for Yocto using the following recipe:

SUMMARY = "Data Compression Library (DCCL)"
DESCRIPTION = "DCCL library for Yocto"
LICENSE = "MIT"

LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

SRCREV = "d7c89774b68a031929e634f9d4a668659e52c5d0"

SRC_URI= "git://github.com/GobySoft/dccl.git;protocol=https;branch=4.0"

SRC_URI[md5sum] = "102a5140bf01fb8c790c84c00ccb89d7"
SRC_URI[sha256sum] = "45a26992f0e12a42b651f150c6fb92681e866dea493501f979e9a8d4df430bc9"

S = "${WORKDIR}/git"

inherit cmake

DEPENDS ="\
            boost \
            protobuf\
            protobuf-c\
        "

EXTRA_OECMAKE += "-DCMAKE_INSTALL_PREFIX=${D}${prefix}"
EXTRA_OECMAKE += "-DCMAKE_INSTALL_BINDIR=${D}${bindir}"
EXTRA_OECMAKE += "-DCMAKE_INSTALL_LIBDIR=${D}${libdir}"
EXTRA_OECMAKE += "-DCMAKE_INSTALL_INCLUDEDIR=${D}${includedir}"
EXTRA_OECMAKE += "-DCMAKE_INSTALL_DATADIR=${D}${datadir}"


FILES_${PN} += "${libdir}/* ${bindir}/* ${includedir}/* "

But I receive the following error:

...
| Build host architecture: x86_64
| Build target architecture: aarch64
| Setting CMAKE_CXX_STANDARD to 14 as required by DCCL (when Boost is available). If you wish to use a newer standard, set CMAKE_CXX_STANDARD directly
| Compiling in Git source tree.
| DCCL is cross-compiling. Target library architecture:
| CMake Error at CMakeLists.txt:118 (message):
|   Failed to find protoc-gen-dccl for cross-compiling
...

I looked into a similar issue that was closed years ago : #28
But it seems like the issue wasn't fixed.

Could you help me with this?

@bahaeg123 bahaeg123 changed the title DCCL fails to build on Yocto DCCL fails to cross compile (building on Yocto) Aug 11, 2023
@tsaubergine
Copy link
Member

tsaubergine commented Aug 15, 2023

Hi -

I merged #28 so that fix is in the current codebase. I don't use Yocto so I can't be super helpful. @MikeGodin do you have any thoughts?

The fundamental issue is that protoc-gen-dccl (the Protobuf compiler plugin for DCCL) needs to be available for the host build architecture (usually amd64).

For the Debian build, I run the amd64 builds first then install the amd64 version of dccl4-compiler (which includes the amd64 protoc-gen-dccl) into the host machine for the cross build. See https://github.com/GobySoft/dccl/blob/4.0/.circleci/config.yml#L172

Also, DCCL is licensed LGPL, not MIT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants