error: initializer element is not constant
#define ULAB_REFERENCE_FLOAT_CONST(id) ((mp_obj_t)(id))
^
/mnt/hgfs/shared_16/openmv/openmv/src/omv/modules/ulab/code/numpy/numpy.c:84:35: note: in expansion of macro ‘ULAB_REFERENCE_FLOAT_CONST’
{ MP_ROM_QSTR(MP_QSTR_e), ULAB_REFERENCE_FLOAT_CONST(ulab_const_float_e) },
^~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/hgfs/shared_16/openmv/openmv/src/omv/modules/ulab/code/numpy/…/ndarray.h:71:40: note: (near initialization for ‘ulab_numpy_globals_table[4].value’)
#define ULAB_REFERENCE_FLOAT_CONST(id) ((mp_obj_t)(id))
Hi, you posted this issue in multiple places. There is no needed to do that. As for your error… did you follow the build steps. You literally just copied and pasted the error output and said nothing about how you followed our steps.
I followed your steps and compiled the V4.2.1 version of the code in my Ubuntu virtual machine, but an error was reported in the V4.4.2 version of the source code compilation. This problem has been bothering me for a long time. Can you help me? Can you tell me the GCC compiler version number when you compiling the source code for V4.4.2?
Perhaps due to the firewall’s impact on accessing Github within China, some of the downloaded engineering files are missing. This is my email shezhou606@gmail.com Can you compress your V4.4.2 source code and send it to my email?
I followed your compilation steps and successfully ran the V4.2.1 firmware on the OpenMV4 PULS device
Hi, you need to do:
make TARGET=OPENMV4P -j8
I don’t see a target in your make command.
Also, I don’t run into the same errors as you.
Anyway, it seems like the error is related to MicroPython and the version and etc. Make sure you did git submodule update --init
on the MicroPython repo and also compiled the up to date cross compiler as we mention in our docs. Also, do the same git submodule update --init
on the main repo.
~/GitHub/openmv/src$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-HskZEa/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)
~/GitHub/openmv/src$
alientek@ubuntu16:/mnt/hgfs/shared_16/openmv/openmv$ cd src/micropython/
alientek@ubuntu16:/mnt/hgfs/shared_16/openmv/openmv/src/micropython$ git submodule update --init
fatal: reference is not a tree: 42849560ba7906f023f61e5f7ff3709ba2c1dfca
Unable to checkout ‘42849560ba7906f023f61e5f7ff3709ba2c1dfca’ in submodule path ‘lib/mynewt-nimble’
fatal: unable to access ‘GitHub - apache/mynewt-nimble: Apache mynewt’: gnutls_handshake() failed: The TLS connection was non-properly terminated.
Unable to fetch in submodule path ‘lib/mynewt-nimble’
lib/mynewt-nimble I tried many times but couldn’t download it
That one doesn’t matter. Skip it.
So, remove the --init part of the command. Just do git submodule udpate.
Is there no way to solve this problem?
Hi,Can you give me an email number? I will compress the error code and send it to you.
Hi, honestly, it will compile fine on my computer. You need to dig in and try to figure out what the error is.
Also, help support is for folks using our default firmware. If you are building it yourself it’s expected you can get pass these issues.
I really don’t know what problem you are running into though.