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

can't complete 'make -j' #88

Open
danish5608 opened this issue Dec 9, 2022 · 2 comments
Open

can't complete 'make -j' #88

danish5608 opened this issue Dec 9, 2022 · 2 comments

Comments

@danish5608
Copy link

always a new error popping up depending on which 'make -j' i run eg. make -j2 / j3 /j4

can never seem to get past 80%
issue1

@physicsfreak963
Copy link

running through the same issue right now, any luck with you figuring it out ?

@Remy-Rahem-UdeS
Copy link

Since GCC 8, the compiler tries to detect when strncpy tries to copy a source string bigger than the destination, which might cause a string truncation and remove the termination character ('\0') during the copy. This causes the destination string to not be a string anymore (a string in C and C++ NEEDS to have the termination character, as per its definition). Since GCC 9, these warnings became errors preventing the compilation, which we see here.
While the authors added the termination character at the following line (robot/src/SimulationBridge.cpp:74), GCC doesn't seem to register it, causing the error.
To resolve this issue, you could replace the 'strncpy' by a 'memcpy', tricking the compiler into thinking you are only copying an array, since the termination character was added at the following line.
As such, you should have the following at robot/src/SimulationBridge.cpp:73:
memcpy(_sharedMemory().robotToSim.errorMessage, e.what(), sizeof(_sharedMemory().robotToSim.errorMessage));

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

3 participants