Error on build-ubersparklibs

C compiler not finding links to unsigned data types (u8, u16, u32, u64).

Example:
syntax error after ‘{’ and before ‘u16’.
Ill-formed declaration.
The following identifier is used as a type, but has not been defined as such:
‘u16’

Which branch are you seeing this error on? master and/or develop?

I am on the develop branch.

Can you post the entire build log including the error? Also, does this error happen only on develop or on master as well? Thanks

Error Log on develop:
cd /home/jrschlichting/Documents/UberFolder/uberspark/src/libs/libxmhfc && make -f libubersparkc.mk -w build
make[1]: Entering directory /home/jrschlichting/Documents/UberFolder/uberspark/src/libs/libxmhfc' make[1]: Nothing to be done forbuild’.
make[1]: Leaving directory /home/jrschlichting/Documents/UberFolder/uberspark/src/libs/libxmhfc' cd /home/jrschlichting/Documents/UberFolder/uberspark/src/libs/libxmhfcrypto && make -f libubersparkcrypto.mk -w build make[1]: Entering directory/home/jrschlichting/Documents/UberFolder/uberspark/src/libs/libxmhfcrypto’
Building sha1.o from .//hashes/sha1/sha1.c
ccomp -c -O -fno-fpu -fbitfields -fpacked-structs -fstruct-return -fno-inline-asm -nostdinc -I/usr/local/uberspark/include -I/usr/local/uberspark/hwm/include -I/usr/local/uberspark/libs/include -D__XMHF_TARGET_CPU_X86__ -D__XMHF_TARGET_CONTAINER_VMX__ -D__XMHF_TARGET_PLATFORM_X86PC__ -D__XMHF_TARGET_TRIAD_X86_VMX_X86PC__ -I/home/jrschlichting/Documents/UberFolder/uberspark/src/libs/libxmhfc/include -I/home/jrschlichting/Documents/UberFolder/uberspark/src/libs/libxmhfcrypto/include -I/home/jrschlichting/Documents/UberFolder/uberspark/src/libs/libxmhfhw/include -I/home/jrschlichting/Documents/UberFolder/uberspark/src/libs/libxmhfgeec/include -I/home/jrschlichting/Documents/UberFolder/uberspark/src/libs/libxmhfdebug/include -o sha1.o .//hashes/sha1/sha1.c
/usr/local/uberspark/hwm/include/xmhfhwm_cpu.h:212:3: syntax error after ‘{’ and before ‘u16’.
Ill-formed declaration.
The following identifier is used as a type, but has not been defined as such:
‘u16’
Fatal error; compilation aborted.
1 error detected.
make[1]: *** [sha1.o] Error 2
make[1]: Leaving directory `/home/jrschlichting/Documents/UberFolder/uberspark/src/libs/libxmhfcrypto’
make: *** [build-ubersparklibs] Error 2

Happens on both branches

Are you using Ubuntu 16.04 LTS 64-bit development environment?

Also am assuming you followed the instructions on the base uberspark build and installation instructions at: https://uberspark.org/docs/build-install.html

before building the libs (using instructions at https://uberspark.org/docs/verify-build-install-libs.html)?

Debugging this a little. On the master branch, with my dev platform (Ubuntu 16.04 64-bit WSL), sha1.c is built (successfully) with the following build parameters:

Building sha1.o from .//hashes/sha1/sha1.c
ccomp -c -O -fno-fpu -fbitfields -fpacked-structs -fstruct-return -fno-inline-asm -nostdinc -I/usr/local/uberspark/include -I/usr/local/uberspark/hwm/include -I/usr/local/uberspark/libs/include  -D__XMHF_TARGET_CPU_X86__ -D__XMHF_TARGET_CONTAINER_VMX__ -D__XMHF_TARGET_PLATFORM_X86PC__ -D__XMHF_TARGET_TRIAD_X86_VMX_X86PC__  -I/mnt/c/data/work/repos/public/hypcode/uberspark.git/src/libs/libxmhfc/include -I/mnt/c/data/work/repos/public/hypcode/uberspark.git/src/libs/libxmhfcrypto/include -I/mnt/c/data/work/repos/public/hypcode/uberspark.git/src/libs/libxmhfhw/include -o sha1.o .//hashes/sha1/sha1.c

As you can see, your build includes a couple of additional include directories (libxmhfgeec and libxmhdebug). More importantly, I am not sure about the contents of your /usr/local/uberspark/. Can you confirm you successfully built and installed the base uberspark tool-chain (per https://uberspark.org/docs/build-install.html) prior to building the libs?

On branch Master ‘make’ returns this warning for building sources:
ocamlfind ocamlc -package unix -package str -package yojson -package uslog -package libusmf -linkpkg -o umf umf.ml
File “umf.ml”, line 690, characters 5-28:
Warning 10: this expression should have type unit.

On branch Master ‘sudo make install’ returns no errors.

I ran through the process again starting from a VM snapshot with all the prereqs installed and now it built. So… I have no idea what this error was caused by.

Ok great. We should perhaps create a docker container to simply the build workflow with all the prereqs installed. Let me know if you would be willing to give it a shot and submit a patch and we can work out the next steps…Thanks!

I was able to successfully build the libraries in the master branch with ubuntu 14.04 but am running into an issue duplicating the process on 16.04, currently I am getting an error with the making of sources on both branches.

‘integer literal exceeds range of representable integers of type int’

In Master the error appears in: uberspark.ml line 439 char 63-79

In develop the error appears in: uhwm_main.ml line 85 char 70-80

This error is most likely due to a mismatch between the compiler (32-bit) and the available integer sizes. Are you working with a 64-bit ubuntu development environment?

I am working on a VM using a 16.04 32-bit Ubuntu OS image

Can you try with a 64-bit ubuntu 16.04 and post your results?

I am back to having the missing data type errors on 64-bit ubuntu 16.04 on develop, built successfully on master.
Log:
In file included from /usr/local/uberspark/hwm/include/xmhf-hwm.h:99:0,
from /usr/local/uberspark/include/uberspark.h:61,
from interface.c:47:
/usr/local/uberspark/hwm/include/xmhfhwm_mem.h:62:8: error: unknown type name ‘u8’
extern u8 xmhfhwm_mem_region_apbootstrap_dataseg[XMHFHWM_MEM_X86SMP_APBOOTSTRAP_DATASEG_SIZE];
^
/usr/local/uberspark/hwm/include/xmhfhwm_mem.h:65:61: error: unknown type name ‘u32’
extern void xmhfhwm_vdriver_mem_copy_to_apbootstrap_codeseg(u32 sourceaddr);
^
/usr/local/uberspark/hwm/include/xmhfhwm_mem.h:68:29: error: unknown type name ‘u32’
bool _impl_xmhfhwm_mem_read(u32 sysmemaddr, sysmem_read_t readsize, u64 *read_result);
^
/usr/local/uberspark/hwm/include/xmhfhwm_mem.h:68:69: error: unknown type name ‘u64’
bool _impl_xmhfhwm_mem_read(u32 sysmemaddr, sysmem_read_t readsize, u64 *read_result);
^
/usr/local/uberspark/hwm/include/xmhfhwm_mem.h:69:30: error: unknown type name ‘u32’
bool _impl_xmhfhwm_mem_write(u32 sysmemaddr, sysmem_write_t writesize, u64 write_value);
^
/usr/local/uberspark/hwm/include/xmhfhwm_mem.h:69:72: error: unknown type name ‘u64’
bool _impl_xmhfhwm_mem_write(u32 sysmemaddr, sysmem_write_t writesize, u64 write_value);
^
/usr/local/uberspark/hwm/include/xmhfhwm_mem.h:71:5: error: unknown type name ‘u32’
u32 dstaddr, u32 srcaddr, u32 size);
^
/usr/local/uberspark/hwm/include/xmhfhwm_mem.h:71:18: error: unknown type name ‘u32’
u32 dstaddr, u32 srcaddr, u32 size);
^
/usr/local/uberspark/hwm/include/xmhfhwm_mem.h:71:31: error: unknown type name ‘u32’
u32 dstaddr, u32 srcaddr, u32 size);

Another error is ‘hugetalbfs.h’ no such file or directory exists

Can you please post the entire build log as a file attachment? This will enable better debugging of such build issues. Thanks!

There doesnt seem to be a file attachment function.
https://pastebin.com/iYL11Kgk

https://pastebin.com/iYL11Kgk

Thanks. I have created a changeset towards fixing this and have pushed a new branch fix-build-segregate-loaders based on develop; works fine on Ubuntu 16.04 64-bit WSL. Can you checkout branch: fix-build-segregate-loaders and see if this resolves the issue on your side?

There doesnt seem to be a file attachment function.

I have updated the site to allow file attachments to posts. You should be able to attach files now.

Build works for the src libraries.

buildlog.txt (3.0 KB)

Error on make verify-ubersparklibs the output of the make is attached above.