@OSO-Bear my guess would be that you are using dynamic linking and have a version mismatch in your libraries. Try statically linking and if this is successfully take a look at the versions you are compiling and and running against.
I spent a week trying different configurations to solve this issue, the two main docker platforms I list below:
Windows 10 running linux docker container
Ubuntu 18.04 LTS running linux docker container
The final result on both platforms were consistent:
libwebsockets.h not found error
Mosquitto build fails
Not enough space available on the container
Workarounds (note: this works on a failed container):
Increase the default docker container size allocated by the docker daemon form 20Gb to 40Gb. I found the final build is 20.7Gb total and takes about 7 hours on Windows and 4 hours on Ubuntu...Give or take. This is done by modifying the docker daemon.json file.
docker attach <container ID> (note: CTRL-p CTRL-Q to SIGKILL)
Attach to the docker container and use VIM to modify the .config file and:
a. Search for all instances of the keyword "mosquitto" and comment them out from the build configuration. If you need mosquitto, you'll have to find another way around the issue.
note: I recommend addding the "is not used" value after commenting out the line
Either run make menuconfig to add libwebsockets library and the libwesockets examples to the build configuration. Or while you're modifying the .config file, do a search using VIM for libwebsockets and add the library and examples to the build.
note: I built libwebsockets library by [using an * in menuconfig or =y in .config they are accomplishing the same thing] and set the libwebsockets examples [M in menuconfig or =m in .config]
make -j1 V=s
Run make [options] inside of the attached container. Docker automatically creates several intermediate containers when necessary and I found that using a Dockerfile can be problematic for Cross-Compile build process.
With some minor adjustments, you can build the 18.06 branch on the current docker image.
I wrote a bit about it here.
I haven't yet got as far as trying the existing repo packages in this firmware, but if they fail you should be able to just build what you need yourself using the docker build environment.
Daniel that is an interesting idea, but I expect it will quite slow given the overhead.
I'm currently building the the LEDE system on the docker image running on my Surface 4, i7, 16GB, Windows 10 Pro 64Bit the build has been running for about 18 hours and still has not completed. The same build on the same machine but running Ubuntu 17 on VMWare Workstation Pro 15, builds in about 2 hours.
How does the kernel differ from just a fresh kernel from kernel.org? Devicetree settings etc.
What I'm looking for is , grab kernelsource from kernel.org select correct devicetree and arch,
compile with cross compiler (mipsel-linux-musl) and create some sort of image to be programmed to the union
I've found this topic from @Maximilian-Gerhardt (Thank you for your excellent guide), explaining how to build kernel module for Omega2. I've found this in his topic:
It conveniently compiled the hello-world.ko file and even created an ipk package.
Unfortunetly, trying to installing that package will give you a kernel mismatch error
because the kernel hashes differ (see this link). Loading the .ko file directly will still work though.
So, I'm able to compile the kernel modules I need (copying the .ko files in /lib/modules/4.4.74/, but the ipk still does not match.
Any suggestions to compile ipk kernel modules for official firmware?
The jist of it is that you'll need to use the Build System to do your cross compiling. If you need a separate library for your program, it will first have to be built by the build system before you can include it in your program.
I had same problem on Fedora 28, as build machine. After some research i simply decide to use more fresh e2fsprogs where conflict is solved. In same time i use version enough close to default one. I.e. i use 1.43.8 instead of 1.43.3
Take a look at diff files e2fsprogs-tools.diff e2fsprogs-utils.diff
@OSO-Bear Judging by the output of the program and your makefile, it looks like your program was compiled for x86 (your computer). You'll have to use an xCompile.sh script like the example to cross compile your C program.
PS it's three backticks to open a code block, and three to close it. See this link for more markdown syntax.