How can I cross compile odhcp6c?

I want to compile odhcp6c package in VM (Linux Mint Debian Edition) for my router NBG7815. But the package's readme doesn't explain how to cross compile it.

** Compiling **

odhcp6c uses cmake:
* To prepare a Makefile use:  "cmake ."
* To build / install use: "make" / "make install" afterwards.
* To build DEB or RPM packages use: "make package" afterwards.

I assume that odhcp6c executable created by this guide won't work on my router's SoC architecture. How can I cross compile it?

{
        "kernel": "6.6.73",
        "hostname": "router-sinan",
        "system": "ARMv8 Processor rev 4",
        "model": "Zyxel NBG7815",
        "board_name": "zyxel,nbg7815",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "NBG7815-24.10.0-NSS",
                "revision": "r28427+144-6df0e3d02a-ff321885c3",
                "target": "qualcommax/ipq807x",
                "description": "OpenWrt NBG7815-24.10.0-NSS r28427+144-6df0e3d02a-ff321885c3",
                "builddate": "1738624177"
        }
}

Like everything else, either as part if a full build or using the SDK.

2 Likes

I thought I could compile a single package, can't I?
If so, I forked odhcp6c and merged PR-93 https://github.com/sinancetinkaya/odhcp6c
How can I replace the original odhcp6c with the merged one in OpenWRT clone folder?

You can, but only if you build it properly within (and against) your target, e.g. by using the SDK.

2 Likes

I'm sorry but a vague answer without an example, guide doesn't help.

With the help of ChatGPT, added How to cross compile odhcp6c for OpenWRT in Linux with IPv6 fix merged https://github.com/sinancetinkaya/odhcp6c

1 Like

Thank you for the gist because today I also wondered about what I need to do to compile just a package. Thx.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.