tX1 make error

hi, i make xilinx xapp1052 linix software, and i install gtk+2.0 and glade how can make these files
tx1 show make error:
make
gtk-builder-convert xbmd_app.glade xbmd_app.xml
WARNING: duplicate id “menuitem”
WARNING: duplicate id “new_menu_item”
Wrote xbmd_app.xml
make -C /lib/modules/3.10.67-g458d45c/build M=/root/xbmd modules
make[1]: Entering directory /usr/src/linux-headers-3.10.67-g458d45c' CC [M] /root/xbmd/xbmd.o gcc: error: unrecognized command line option ‘-mgeneral-regs-only’ make[2]: *** [/root/xbmd/xbmd.o] Error 1 make[1]: *** [_module_/root/xbmd] Error 2 make[1]: Leaving directory /usr/src/linux-headers-3.10.67-g458d45c’
make: *** [all] Error 2

the Make file is
obj-m := xbmd.o

path := $(shell uname -r)

all:
gtk-builder-convert xbmd_app.glade xbmd_app.xml
make -C /lib/modules/$(path)/build M=/root/xbmd modules
g++ -Wall -g -o xbmd_app cfg.cpp bmd.cpp xbmd_ep.cpp xbmd_main.cpp pkg-config --cflags --libs gtk+-2.0 --libs libglade-2.0 -export-dynamic
clean:
make -C /lib/modules/$(path)/build M=/root/xbmd clean

I noticed mention of “-mgeneral-regs-only”, which is an option for aarch64, and incompatible with arm (32-bit). I’m going to guess you were building natively from R23.1 or R23.2, which still has a 32-bit architecture within user space. Setting up config first for arm 32-bit instead of arm64 may take care of the issue; running on R24.1 (which is pure 64-bit aarch64) may also do the job for you.

thank you for repling.yes,i use jetpack 2.1 and l4t 23.2and there is not the newer jetpack.
i add “export ARCH = arm” in Makefile,and the error is

root@tegra-ubuntu:~/xbmd# make
gtk-builder-convert xbmd_app.glade xbmd_app.xml
WARNING: duplicate id “menuitem”
WARNING: duplicate id “new_menu_item”
Wrote xbmd_app.xml
make -C /lib/modules/3.10.67-g458d45c/build M=/root/xbmd modules
make[1]: Entering directory /usr/src/linux-headers-3.10.67-g458d45c' CC [M] /root/xbmd/xbmd.o In file included from include/linux/types.h:5:0, from include/linux/init.h:5, from /root/xbmd/xbmd.c:57: include/uapi/linux/types.h:4:23: fatal error: asm/types.h: No such file or directory #include <asm/types.h> ^ compilation terminated. make[2]: *** [/root/xbmd/xbmd.o] Error 1 make[1]: *** [_module_/root/xbmd] Error 2 make[1]: Leaving directory /usr/src/linux-headers-3.10.67-g458d45c’
make: *** [all] Error 2

The source code wants <asm/types.h> (which is “types.h”, by default located at “/usr/include/asm/types.h” if installed), but this is not installed. Does the software mention any prerequisite requirements?

the software say only test in federo 10.i find these .h files are in /usr/src/linux-headers-3.10.67-g458d45c/arch/arm64/include,so i copy them to /usr/src/linux-headers-3.10.67-g458d45c/arch/arm/include.then find .hfiles.but there are too many errors.so i modify /usr/src/linux-headers-3.10.67-g458d45c/arch/arm64/Makefile
delete “KBUILD_CFLAGS += -mgeneral-regs-only” and use aarch64
so error is
/usr/src/linux-headers-3.10.67-g458d45c/arch/arm64/include/uapi/asm/ptrace.h:76:2: error: unknown type name ‘__uint128_t’
__uint128_t vregs[32];
^

/root/xbmd/xbmd.c: At top level:
/root/xbmd/xbmd.c:430:5: error: unknown field ‘ioctl’ specified in initializer
ioctl: XPCIe_Ioctl,
^

/root/xbmd/xbmd.c: In function ‘XPCIe_init’:
/root/xbmd/xbmd.c:441:3: error: implicit declaration of function ‘pci_find_device’ [-Werror=implicit-function-declaration]
gDev = pci_find_device (PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_XILINX_PCIE, gDev);
^
/root/xbmd/xbmd.c: In function ‘XPCIe_exit’:
/root/xbmd/xbmd.c:617:9: error: implicit declaration of function ‘kfree’ [-Werror=implicit-function-declaration]
(void) kfree(gReadBuffer);

cc1: some warnings being treated as errors
make[2]: *** [/root/xbmd/xbmd.o] Error 1
make[1]: *** [module/root/xbmd] Error 2
make: *** [all] Error 2

is “__uint128_t” unknown type name?

Fedora 10 is very very old, I wouldn’t be surprised at enormous differences in kernels for then versus now. Also, I’m guessing from the unknown type name there may be a side-effect of Intel architecture dependencies. I’m wondering if you have a newer source available for the software? Or if documentation on the existing software mentions hardware/kernel requirements?

yes,it’s very old. But it is the Xilinx fogs pice driver for Linux,and no the newer.
If I want transmit data from flag to tx1by pice,must use the software.

But the file ptrace.h is system file, why __uint_128 is unkown type name.
Because it not 64 system?
If I use 24.1,I need install cuda by myself?

I’m having a similar problem with __uint128_t not defined for /usr/include/aarch-linux-gnu/asm/ptrace.h when I compile my code. This is also true for sigcontext.h in the same location. I checked the types.h file, but __uint128_t is not defined there. Should it be?

I’m trying to compile a 64 bit version of my program that compiles fine with arm-linux-gnueabihf (32 bit). This is intended to run on the r24.1 release of the tx1.

I think CUDA for R24.1 was mentioned recently as coming out approximately next week.

As for definition of “__uint_128”, such definitions are not considered portable and have definitions only internal to certain software which is not part of the C language itself. Such aliases are made available either because of manually coded tradition or automatic configuration scripts (think autoconf, automake, libtool, so on). Some of the types.h files mentioned in above errors are relative paths, not absolute paths, and not standard search paths…which suggests the source package being compiled should have the definition through something like the typical “./config” script.

Sample reposted from above:

CC [M] /root/xbmd/xbmd.o
In file included from <b>include/linux/types.h</b>:5:0,
from include/linux/init.h:5,
from /root/xbmd/xbmd.c:57:
<b>include/uapi/linux/types.h</b>:4:23: fatal error: asm/types.h: No such file or directory

Thank for every reply. I should try the 24.1 system

Hello, I am doing the same job now, trying to compile the driver of xapp1052 on a higher version of the Linux kernel. Have you succeeded?