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

Error compiling... #637

Closed
alexe100 opened this issue Jul 11, 2024 · 1 comment · Fixed by #639
Closed

Error compiling... #637

alexe100 opened this issue Jul 11, 2024 · 1 comment · Fixed by #639
Assignees
Labels
bug Something isn't working

Comments

@alexe100
Copy link

In ubuntu 20:

~/Downloads/iotivity-lite/port/linux$ make DEBUG=1 IPV4=1 TCP=1 SECURE=0

returns:

In file included from ../../apps/simpleserver_pki.c:20:
../../include/oc_pki.h:38:10: fatal error: mbedtls/build_info.h: No such file or directory
38 | #include <mbedtls/build_info.h>
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:563: simpleserver_pki] Error 1

I have mbedtls installed but the file build_info.h is not there

Thanks

@Danielius1922 Danielius1922 self-assigned this Aug 7, 2024
@Danielius1922 Danielius1922 added the bug Something isn't working label Aug 7, 2024
@Danielius1922
Copy link
Member

Danielius1922 commented Aug 7, 2024

Mbedtls shouldn't be used when SECURE=0, try adding PKI=0 to your command? But PKI=0 should be forced if SECURE=0, so I'll do that.

The build should use local checkout of mbedtls anyway that is the deps/mbedtls folder. I think the issue is that we're including mbedtls in code using <> instead "", which means that mbedtls headers found in standard system folders will be used instead of the local headers. Which is wrong, I'll change the includes to use "".

But you be able to make the current version work too. It seems you have an older mbedtls build in some standard system folder. IoT build needs mbedtls 3.1 (or 3.5.0 if you use the MBEDTLS_FORCE_3_5_0=1 switch). We patch the mbedtls too, so you need to run the Makefile or cmake build of IoT first, this patches the mbedtls and then install mbedtls. Do you need to use Makefile or is cmake available? The cmake build installs mbedtls automatically, with Makefile you need to do it manually. Probably something like:

cd deps/mbedtls
make
sudo make install

@Danielius1922 Danielius1922 linked a pull request Aug 7, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants