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

Linux Set up #8

Closed
2Guz opened this issue Jun 22, 2016 · 1 comment
Closed

Linux Set up #8

2Guz opened this issue Jun 22, 2016 · 1 comment
Assignees

Comments

@2Guz
Copy link

2Guz commented Jun 22, 2016

I'm following the steps provided on this page, but I have reached a part that I'm stuck on. https://github.com/ROBOTIS-Leon/test2/wiki/3.2.2-Linux I navigated to the linux64 directory and typed the command "make" and received an error. I then typed "make clean" to try and fix the issue, but when I typed "make" again, the same error appeared.

Here is the error I have:
root@river-turtlesim:/home/christian/Downloads/DynamixelSDK-master/c/build/linux64# make
mkdir -p ./.objects/
gcc -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c -I../../include -m64 -fPIC -g -c ../../src/dynamixel_sdk/group_bulk_read.c -o .objects/group_bulk_read.o
In file included from ../../include/dynamixel_sdk/group_bulk_read.h:43:0,
from ../../src/dynamixel_sdk/group_bulk_read.c:44:
../../include/dynamixel_sdk/robotis_def.h:42:29: error: conflicting types for ‘int8_t’
typedef char int8_t;
^
In file included from /usr/include/stdlib.h:314:0,
from ../../src/dynamixel_sdk/group_bulk_read.c:43:
/usr/include/x86_64-linux-gnu/sys/types.h:194:1: note: previous declaration of ‘int8_t’ was here
intN_t (8, __QI);
^
make: *** [.objects/group_bulk_read.o] Error 1
root@river-turtlesim:/home/christian/Downloads/DynamixelSDK-master/c/build/linux64# make cleanrm -f ./.objects/group_bulk_read.o ./.objects/group_bulk_write.o ./.objects/group_sync_read.o ./.objects/group_sync_write.o ./.objects/packet_handler.o ./.objects/port_handler.o ./.objects/protocol1_packet_handler.o ./.objects/protocol2_packet_handler.o ./.objects/port_handler_linux.o ./libdxl_x64_c.so
root@river-turtlesim:/home/christian/Downloads/DynamixelSDK-master/c/build/linux64# make
mkdir -p ./.objects/
gcc -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c -I../../include -m64 -fPIC -g -c ../../src/dynamixel_sdk/group_bulk_read.c -o .objects/group_bulk_read.o
In file included from ../../include/dynamixel_sdk/group_bulk_read.h:43:0,
from ../../src/dynamixel_sdk/group_bulk_read.c:44:
../../include/dynamixel_sdk/robotis_def.h:42:29: error: conflicting types for ‘int8_t’
typedef char int8_t;
^
In file included from /usr/include/stdlib.h:314:0,
from ../../src/dynamixel_sdk/group_bulk_read.c:43:
/usr/include/x86_64-linux-gnu/sys/types.h:194:1: note: previous declaration of ‘int8_t’ was here
intN_t (8, __QI);
^
make: *** [.objects/group_bulk_read.o] Error 1
root@river-turtlesim:/home/christian/Downloads/DynamixelSDK-master/c/build/linux64#

@LeonJung
Copy link
Contributor

Hi!
I'm so sorry for the inconvenience.
The main reason of what you said is that intN_t data types are already predefined in the linux platform, so the error was occurred by double definition on robotis_def.h. Hence, you can solve it by putting #if defined(_WIN32) || defined(_WIN64) and #endif near the type definition of intN_ts (just wrap three of them), like:

#if defined(_WIN32) || defined(_WIN64)
typedef char                int8_t;
typedef short int           int16_t;
typedef int                 int32_t;
#endif

I thought that this had been updated in the DynamixelSDK-master but it wasn't. It was absolutely my fault. Besides, after solving that problem, you will face different kind of errors so do your work on different way.

I recommend you to use the source of DynamixelSDK-develop rather than DynamixelSDK-master for now. Kinds of problems in the code are solved (as I know), and I will merge the DynamixelSDK-master when my work is finished, so don't waste your time.

Any other questions, don't hesitate to ask me.

Thank you

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

2 participants