Closed galaxyskyknight closed 1 year ago
Are you able to reproduce this with our known working openwrt build process we have included in the repo? That will make it simpler to check
I kicked off an automated CI build with our standard build process and it successfully builds. Can you explain why you are using a different build process? Perhaps if you can outline the improvements achieved with your diffierent build process we can consider adopting them in the standard build.
However, for the moment, I would suggest you build with the standard build process because it can successfully compile the code.
I kicked off an automated CI build with our standard build process and it successfully builds. Can you explain why you are using a different build process? Perhaps if you can outline the improvements achieved with your diffierent build process we can consider adopting them in the standard build.
However, for the moment, I would suggest you build with the standard build process because it can successfully compile the code.
I am not using the official Openwrt but the LEDE repo, this makefile comes from the LEDE repo. I believe your stand process is working for the official openwrt repo but I never use it as I will stick to the LEDE repos and follow its makefile. that's the reason.
btw: can we directly face to the real problem? it is straightforward, it is working for the previous commit but not any more for the latest, there must be some problem there for the recent change(may be compatible issue), it will be more helpful to me to get a quick solution than tangled with a process critical, I would apperciate that if you could help on this, thanks for your understand.
I tired this makefile on the commit one by one start where I could work it through, and here is the findings, and later on commtis till to the latest there are some different errors but pthread error is always there.
I add the #include <pthread.h>
at the head of n2n_typedefs.h(originally I add n2n.h but introduce the other cross header include issue, it is problem and incorrect, so the bestway is to include pthread.h directly), the issue resolved for me, the compile smoothly passed, please consider the fix and try the CI to see if it has any problem on other env, thanks. @hamishcoleman
https://github.com/galaxyskyknight/n2n/commit/199714e73a5f8fa798bddff8c68294f97d431932
Thanks for narrowing down what the problem is. We will try and have a look at where we can include that header (n2n_typedefs.h is probably not the right place)
Can you tell me what the difference you get between OpenWRT and LEDE is? According to the OpenWRT about page, they have merged with LEDE...
Thanks for narrowing down what the problem is. We will try and have a look at where we can include that header (n2n_typedefs.h is probably not the right place)
Can you tell me what the difference you get between OpenWRT and LEDE is? According to the OpenWRT about page, they have merged with LEDE...
Hi there, I am sorry that I am not using the OpenWRT official repo, so I have no idea what their makefile done, but for lede repo, they are recently upgrade to 3.0 and newly developed the makefile accordingly and changed to use CMake as you can see in this makefile, I believe this is a minor problem since I can add it in n2n_typedefs.h and no other compile issue at now, I am asking for help here is just to verify it is good to your 'standard' process is not broken with adding this include file and merge it to the dev as a fix if it is fine.
thanks.
I found the LEDE repository and it appears to be almost identical to the OpenWRT repository. Perhaps I am looking at the wrong place, can you point me at the repository that you are compiling from. New applications of this code base should not be using CMake as that is less maintained, less understood, less flexible and most importantly it is deprecated.
I found the LEDE repository and it appears to be almost identical to the OpenWRT repository. Perhaps I am looking at the wrong place, can you point me at the repository that you are compiling from. New applications of this code base should not be using CMake as that is less maintained, less understood, less flexible and most importantly it is deprecated.
On LEDE repo, they changed to use CMake makefile at this commit along with upgrading to use n2n 3.0 code base, just FYI https://github.com/coolsnowwolf/lede/commit/886a9fd3004a5dfb1b97086b7fe3f27fef1a6c20
so can we merge it?
Adding this include to the file you suggest is not the right place. As we cannot reproduce this on our supported platforms, we cannot easily test alternatives either
Adding this include to the file you suggest is not the right place. As we cannot reproduce this on our supported platforms, we cannot easily test alternatives either
It doesn't make sense to me. I have checked the source code, the orginal compile error comes from the management.h, but it has a reference to the pthread usage like below, however there is no any where has included the pthread.h.And its recursive included file in management.h is n2n_typedef.h, there is also no anywhere to explicitly include the pthread.h header file, but only a compile macro like this:
#ifdef HAVE_PTHREAD
pthread_t id; /* thread id */
pthread_mutex_t access; /* mutex for shared access */
#endif
so this is the reason that the error: there is a reference defination to pthread_t and its mutex in management.h but not include in the header and also no any recursive included for the pthread.h in n2n_typedef.h
I don't know how it could work through in other platform with no any error, perhaps there is other tricky in makefile but I cannot find. The help I am asking is just the investigation for this...but not the prevarication like the way: we are working all well and we cannot reproduce and your platform is not supported and no way test, so your problem I am sorry ....
You have to understand that we simply cannot support every single build platform that exists, we are all volunteers and do not have the time to install, configure, build and understand them all.
It is not prevarication to say that we cannot reproduce this on the supported build platform. Nor is it reasonable to randomly add an include with no way to test it. Please feel free to write a patch to add your preferred build system in a fully automated CI script so that a repeatable test case can be easily seen by other people.
You have to understand that we simply cannot support every single build platform that exists, we are all volunteers and do not have the time to install, configure, build and understand them all.
It is not prevarication to say that we cannot reproduce this on the supported build platform. Nor is it reasonable to randomly add an include with no way to test it. Please feel free to write a patch to add your preferred build system in a fully automated CI script so that a repeatable test case can be easily seen by other people.
OK, I got, thanks.
@galaxyskyknight have you closed this because you solved your compile issue? Can you let us know how you completed the issue?
@galaxyskyknight have you closed this because you solved your compile issue? Can you let us know how you completed the issue?
No, I think I just explained the reason why there should be a
I don't mean I won't to do more but only talk and request, becoz I am not a skillfull developer and not so professional to be a volunteer who can make sure that not mess you guys' job up.
thanks.
I recently encounter the compile issue on LEDE openwrt with n2n, for the latest code here 06c489fd8ad42d6c025beaea0fd62d7d4d948c31, I got the following logs:
however, I use the same makefile to compile the commit on f3e305b254fc88ce829ddb4a63b11e083a65c3ab with no any issue and compile success!
the following is the Makefile I used, can any one of you help to check why the latest code say there is no pthread define and how to fix that? thanks!