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

compile error! #1665

Open
stilong opened this issue Nov 13, 2023 · 1 comment
Open

compile error! #1665

stilong opened this issue Nov 13, 2023 · 1 comment
Assignees
Labels

Comments

@stilong
Copy link

stilong commented Nov 13, 2023

-- Build files have been written to: /home/lgh/neuron/build
[root@openeuler build]# make -j20
[ 0%] Built target neuron-version
[ 1%] Building C object CMakeFiles/neuron-base.dir/src/base/tag.c.o
[ 2%] Building C object CMakeFiles/neuron-base.dir/src/base/neu_plugin_common.c.o
[ 3%] Building C object CMakeFiles/neuron-base.dir/src/base/tag_sort.c.o
[ 4%] Building C object CMakeFiles/neuron-base.dir/src/base/group.c.o
[ 5%] Building C object CMakeFiles/neuron-base.dir/src/base/metrics.c.o
[ 6%] Building C object CMakeFiles/neuron-base.dir/src/base/template.c.o
[ 7%] Building C object CMakeFiles/neuron-base.dir/src/connection/connection.c.o
[ 8%] Building C object CMakeFiles/neuron-base.dir/src/connection/connection_eth.c.o
[ 8%] Building C object CMakeFiles/neuron-base.dir/src/connection/mqtt_client.c.o
[ 9%] Building C object CMakeFiles/neuron-base.dir/src/event/event_linux.c.o
[ 10%] Building C object CMakeFiles/neuron-base.dir/src/event/event_unix.c.o
[ 11%] Building C object CMakeFiles/neuron-base.dir/src/utils/asprintf.c.o
[ 12%] Building C object CMakeFiles/neuron-base.dir/src/utils/json.c.o
[ 13%] Building C object CMakeFiles/neuron-base.dir/src/utils/http.c.o
[ 14%] Building C object CMakeFiles/neuron-base.dir/src/utils/http_handler.c.o
/home/lgh/neuron/src/connection/mqtt_client.c: In function ‘alloc_sqlite_config’:
/home/lgh/neuron/src/connection/mqtt_client.c:800:9: error: invalid initializer
800 | nng_mqtt_msg_get_connect_client_id(client->conn_msg);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 15%] Building C object CMakeFiles/neuron-base.dir/src/utils/http_proxy.c.o
/home/lgh/neuron/src/connection/mqtt_client.c: In function ‘neu_mqtt_client_get_cached_msgs_num’:
/home/lgh/neuron/src/connection/mqtt_client.c:920:15: error: implicit declaration of function ‘nng_mqtt_sqlite_db_get_cached_size’; did you mean ‘neu_mqtt_client_set_cache_size’? [-Werror=implicit-function-declaration]
920 | num = nng_mqtt_sqlite_db_get_cached_size(client->sqlite_cfg);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| neu_mqtt_client_set_cache_size
[ 16%] Building C object CMakeFiles/neuron-base.dir/src/utils/neu_jwt.c.o
/home/lgh/neuron/src/connection/mqtt_client.c: In function ‘neu_mqtt_client_open’:
/home/lgh/neuron/src/connection/mqtt_client.c:1200:47: error: ‘NNG_OPT_MQTT_RETRY_INTERVAL’ undeclared (first use in this function); did you mean ‘NNG_OPT_MQTT_RETAIN’?
1200 | if ((rv = nng_socket_set_ms(client->sock, NNG_OPT_MQTT_RETRY_INTERVAL,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| NNG_OPT_MQTT_RETAIN
/home/lgh/neuron/src/connection/mqtt_client.c:1200:47: note: each undeclared identifier is reported only once for each function it appears in
[ 16%] Building C object CMakeFiles/neuron-base.dir/src/utils/base64.c.o
cc1: all warnings being treated as errors
make[2]: *** [CMakeFiles/neuron-base.dir/build.make:188: CMakeFiles/neuron-base.dir/src/connection/mqtt_client.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 17%] Building C object CMakeFiles/neuron-base.dir/src/utils/async_queue.c.o
make[1]: *** [CMakeFiles/Makefile2:231: CMakeFiles/neuron-base.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

[root@openeuler neuron]# gcc --version
gcc (GCC) 12.3.1 (openEuler 12.3.1-16.oe2309)
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

@gc87 gc87 added the compile label Nov 13, 2023
@eeff
Copy link
Member

eeff commented Jan 15, 2024

Please follow the instructions to install the correct version of dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants