-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Building mbedtls 2.2.0 on RHEL 5 leads to "No rule to make target library/libmbedtls.so', needed by
tests/test_suite_aes.cbc.c'"
#391
Comments
ARM Internal Ref: IOTSSL-596 |
To be honest, I looks more like a CMake issue than an mbed TLS issue, if it works with RHEL 6 and 7 but not 5. Did you try asking CMake folks what they think about it? Also, though I realize this might not be very satisfactory, if CMake is not working for you, we have good old Makefiles too. |
It could be that RHEL 5 has a very old version of CMake. You could try installing a recent CMake version, just to see if the problem then goes away. Here, we use CMake on a variety of very old Unix and Linux platforms, and we actually installed the latest CMake from the source distribution when we moved from autoconf, since we couldn't find packages for all our build machines. |
RHEL 5 has cmake in Version 2.6.4 – which we can't upgrade in EPEL, because it is a RHEL package. Do you see chances to get the CMakefiles adapted accordingly so that they support this cmake version (like mbedtls 1.3.x did)? |
I'm certainly not opposed in principle to supporting older CMake versions if we can, but right now it isn't obvious to me what we changed between 1.3 and now that broke the CMake build with old versions. If you can help us pinpoint what the culprit is, I'll be able to give you a better answer as to whether we can adapt our CMakelists.txt to solve your issue. If you're able to git-bisect the issue and point us to the commit that introduces it, that would probably be a good starting point. |
The problem is caused by your "make apidoc" target. Running "make -j4 all" seems to create the symlink, however "make apidoc" removes the symlink. |
I read your patch and commit message, and while I agree that using
Anyway, I'm considering reverting the change to the apidoc target, because it's quite counter-intuitive and error-prone that |
When I apply my Given I understand that |
Does Again, sorry for breaking your build script, especially on a patch release, that was definitely not the intention. |
No. This is because the header file timestamp changed, thus it needs to rebuild the library. As part of that, the symlinks library/libmbed*.so are partially removed and not created again. So the |
I'll see if I can reproduce the issue with cmake 2.8.9 (the oldest version I can easily access). I'm reverting the change anyway, but I'd really like to understand everything that's going on here. |
This partially reverts 1989caf (only the changes to Makefile and CMakeLists, the addition to scripts/config.pl is kept). Modifying config.h in the apidoc target creates a race condition with make -j4 all apidoc where some parts of the library, tests or programs could be built with the wrong config.h, resulting in all kinds of (semi-random) errors. Recent versions of CMake mitigate this by adding a .NOTPARALLEL target to the generated Makefile, but people would still get errors with older CMake versions that are still in use (eg in RHEL 5), and with plain make. An additional issue is that, by failing to use cp -p, the apidoc target was updating the timestamp on config.h, which seems to cause further build issues. Let's get back to the previous, safe, situation. The improved apidoc building will be resurrected in a script in the next commit. fixes Mbed-TLS#390 fixes Mbed-TLS#391
Return NULL when allocating memory of size zero
Trying to build mbedtls 2.2.0 on RHEL 5 leads to the failure:
Running
after "cmake" and before "make" works around the issue. Interestingly, this only affects RHEL 5, not RHEL 6 or 7, thus this must be related to cmake somehow.
The text was updated successfully, but these errors were encountered: