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

sudo python3 setup.py install doesn't compile #1

Open
coralnode opened this issue Jun 26, 2021 · 2 comments
Open

sudo python3 setup.py install doesn't compile #1

coralnode opened this issue Jun 26, 2021 · 2 comments

Comments

@coralnode
Copy link

coralnode commented Jun 26, 2021

There are multiple issues with bme68xmodule.c

pi@raspberrypi:~/bme688/bme68x-python-library $ sudo python3 setup.py install

running install
running bdist_egg
running egg_info
writing bme68x.egg-info/PKG-INFO
writing dependency_links to bme68x.egg-info/dependency_links.txt
writing top-level names to bme68x.egg-info/top_level.txt
reading manifest file 'bme68x.egg-info/SOURCES.txt'
writing manifest file 'bme68x.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-armv6l/egg
running install_lib
running build_py
running build_ext
building 'bme68x' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/include -I/usr/include/python3.7m -c bme68xmodule.c -o build/temp.linux-armv6l-3.7/bme68xmodule.o -D BSEC
In file included from BSEC_2.0.6.1_Generic_Release_04302021/algo/normal_version/bin/RaspberryPi/PiThree_ArmV6/bsec_interface.h:73,
from internal_functions.h:22,
from bme68xmodule.c:4:
bme68xmodule.c: In function ‘bme_set_heatr_conf’:
BSEC_2.0.6.1_Generic_Release_04302021/algo/normal_version/bin/RaspberryPi/PiThree_ArmV6/bsec_datatypes.h:88:38: error: expected identifier before ‘(’ token
#define BSEC_SAMPLE_RATE_DISABLED (65535.0f) /*!< Sample rate of a disabled sensor */
^
bme68xmodule.c:357:42: note: in expansion of macro ‘BSEC_SAMPLE_RATE_DISABLED’
requested_virtual_sensors[0].BSEC_SAMPLE_RATE_DISABLED;
^~~~~~~~~~~~~~~~~~~~~~~~~
bme68xmodule.c: In function ‘bme_get_bsec_data’:
bme68xmodule.c:516:9: error: ‘bsec_rlst’ undeclared (first use in this function); did you mean ‘bsec_rslt’?
bsec_rlst = bsec_read_data(self->data, &data_length, time_stamp, bsec_inputs, &num_bsec_inputs, sensor_settings.process_data, sensor_settings.op_mode, &(self->bme));
^~~~~~~~~
bsec_rslt
bme68xmodule.c:516:9: note: each undeclared identifier is reported only once for each function it appears in
bme68xmodule.c: In function ‘bme68x_init_type’:
bme68xmodule.c:231:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&serialized_settings[0], sizeof(unsigned char), BSEC_MAX_PROPERTY_BLOB_SIZE, bsec_conf);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

@coralnode coralnode changed the title sudo python3 setup.py install doesn't compily sudo python3 setup.py install doesn't compile Jun 26, 2021
@coralnode
Copy link
Author

coralnode commented Jun 26, 2021

Problem is in this line in bme68xmodule.c.

requested_virtual_sensors[0].BSEC_SAMPLE_RATE_DISABLED;

I think it should be:

requested_virtual_sensors[0].sample_rate = BSEC_SAMPLE_RATE_DISABLED;

@palla89
Copy link

palla89 commented Jun 26, 2021

I had same problem, there are also other two typos in the same file that prevented the building to finish successfully

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