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

Error when trying Start XDNA driver release build #336

Open
hernanda16 opened this issue Dec 22, 2024 · 1 comment
Open

Error when trying Start XDNA driver release build #336

hernanda16 opened this issue Dec 22, 2024 · 1 comment

Comments

@hernanda16
Copy link

hernanda16 commented Dec 22, 2024

I'm currently using ubuntu 22.04.5 with kernel 6.8. I receive error when tried to build XDNA driver
This is my error code :
In file included from /home/her/AMD/xdna-driver/src/shim/hwctx.h:13,
from /home/her/AMD/xdna-driver/src/shim/fence.h:7,
from /home/her/AMD/xdna-driver/src/shim/fence.cpp:4:
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:45: error: expected ‘;’ at end of member declaration
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^
| ;
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:60: error: ‘num_cus’ is not a type
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^~~~~~~
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:47: error: ISO C++ forbids declaration of ‘__counted_by’ with no type [-fpermissive]
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^~~~~~~~~~~~
In file included from /home/her/AMD/xdna-driver/src/shim/hwctx.h:13,
from /home/her/AMD/xdna-driver/src/shim/bo.h:8,
from /home/her/AMD/xdna-driver/src/shim/bo.cpp:4:
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:45: error: expected ‘;’ at end of member declaration
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^
| ;
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:60: error: ‘num_cus’ is not a type
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^~~~~~~
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:47: error: ISO C++ forbids declaration of ‘__counted_by’ with no type [-fpermissive]
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^~~~~~~~~~~~
In file included from /home/her/AMD/xdna-driver/src/shim/hwctx.h:13,
from /home/her/AMD/xdna-driver/src/shim/bo.h:8,
from /home/her/AMD/xdna-driver/src/shim/hwq.cpp:4:
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:45: error: expected ‘;’ at end of member declaration
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^
| ;
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:60: error: ‘num_cus’ is not a type
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^~~~~~~
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:47: error: ISO C++ forbids declaration of ‘__counted_by’ with no type [-fpermissive]
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^~~~~~~~~~~~
In file included from /home/her/AMD/xdna-driver/src/shim/kmq/../hwctx.h:13,
from /home/her/AMD/xdna-driver/src/shim/kmq/../bo.h:8,
from /home/her/AMD/xdna-driver/src/shim/kmq/bo.h:7,
from /home/her/AMD/xdna-driver/src/shim/kmq/hwq.cpp:4:
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:45: error: expected ‘;’ at end of member declaration
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^
| ;
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:60: error: ‘num_cus’ is not a type
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^~~~~~~
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:47: error: ISO C++ forbids declaration of ‘__counted_by’ with no type [-fpermissive]
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^~~~~~~~~~~~
In file included from /home/her/AMD/xdna-driver/src/shim/hwctx.h:13,
from /home/her/AMD/xdna-driver/src/shim/bo.h:8,
from /home/her/AMD/xdna-driver/src/shim/hwctx.cpp:4:
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:45: error: expected ‘;’ at end of member declaration
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^
| ;
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:60: error: ‘num_cus’ is not a type
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^~~~~~~
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:47: error: ISO C++ forbids declaration of ‘__counted_by’ with no type [-fpermissive]
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^~~~~~~~~~~~
In file included from /home/her/AMD/xdna-driver/src/shim/kmq/../hwctx.h:13,
from /home/her/AMD/xdna-driver/src/shim/kmq/../bo.h:8,
from /home/her/AMD/xdna-driver/src/shim/kmq/bo.h:7,
from /home/her/AMD/xdna-driver/src/shim/kmq/device.cpp:4:
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:45: error: expected ‘;’ at end of member declaration
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^
| ;
In file included from /home/her/AMD/xdna-driver/src/shim/pcidev.cpp:8:
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:45: error: expected ‘;’ at end of member declaration
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^
| ;
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:60: error: ‘num_cus’ is not a type
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^~~~~~~
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:60: error: ‘num_cus’ is not a type
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^~~~~~~
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:47: error: ISO C++ forbids declaration of ‘__counted_by’ with no type [-fpermissive]
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^~~~~~~~~~~~
In file included from /home/her/AMD/xdna-driver/src/shim/umq/../hwctx.h:13,
from /home/her/AMD/xdna-driver/src/shim/umq/../bo.h:8,
from /home/her/AMD/xdna-driver/src/shim/umq/bo.h:7,
from /home/her/AMD/xdna-driver/src/shim/umq/bo.cpp:4:
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:45: error: expected ‘;’ at end of member declaration
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^
| ;
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:47: error: ISO C++ forbids declaration of ‘__counted_by’ with no type [-fpermissive]
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^~~~~~~~~~~~
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:60: error: ‘num_cus’ is not a type
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^~~~~~~
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:47: error: ISO C++ forbids declaration of ‘__counted_by’ with no type [-fpermissive]
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^~~~~~~~~~~~
In file included from /home/her/AMD/xdna-driver/src/shim/pcidrv.cpp:6:
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:45: error: expected ‘;’ at end of member declaration
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^
| ;
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:60: error: ‘num_cus’ is not a type
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^~~~~~~
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:47: error: ISO C++ forbids declaration of ‘__counted_by’ with no type [-fpermissive]
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^~~~~~~~~~~~
In file included from /home/her/AMD/xdna-driver/src/shim/kmq/../hwctx.h:13,
from /home/her/AMD/xdna-driver/src/shim/kmq/../bo.h:8,
from /home/her/AMD/xdna-driver/src/shim/kmq/bo.h:7,
from /home/her/AMD/xdna-driver/src/shim/kmq/pcidev.cpp:4:
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:45: error: expected ‘;’ at end of member declaration
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^
| ;
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:60: error: ‘num_cus’ is not a type
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^~~~~~~
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:47: error: ISO C++ forbids declaration of ‘__counted_by’ with no type [-fpermissive]
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^~~~~~~~~~~~
In file included from /home/her/AMD/xdna-driver/src/shim/hwctx.h:13,
from /home/her/AMD/xdna-driver/src/shim/bo.h:8,
from /home/her/AMD/xdna-driver/src/shim/device.cpp:4:
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:45: error: expected ‘;’ at end of member declaration
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^
| ;
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:60: error: ‘num_cus’ is not a type
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^~~~~~~
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:47: error: ISO C++ forbids declaration of ‘__counted_by’ with no type [-fpermissive]
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^~~~~~~~~~~~
In file included from /home/her/AMD/xdna-driver/src/shim/umq/../hwctx.h:13,
from /home/her/AMD/xdna-driver/src/shim/umq/../bo.h:8,
from /home/her/AMD/xdna-driver/src/shim/umq/bo.h:7,
from /home/her/AMD/xdna-driver/src/shim/umq/device.cpp:4:
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:45: error: expected ‘;’ at end of member declaration
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^
| ;
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:60: error: ‘num_cus’ is not a type
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^~~~~~~
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:47: error: ISO C++ forbids declaration of ‘__counted_by’ with no type [-fpermissive]
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^~~~~~~~~~~~
In file included from /home/her/AMD/xdna-driver/src/shim/kmq/../hwctx.h:13,
from /home/her/AMD/xdna-driver/src/shim/kmq/hwctx.h:7,
from /home/her/AMD/xdna-driver/src/shim/kmq/hwctx.cpp:4:
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:45: error: expected ‘;’ at end of member declaration
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^
| ;
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:60: error: ‘num_cus’ is not a type
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^~~~~~~
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:47: error: ISO C++ forbids declaration of ‘__counted_by’ with no type [-fpermissive]
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^~~~~~~~~~~~
In file included from /home/her/AMD/xdna-driver/src/shim/kmq/../hwctx.h:13,
from /home/her/AMD/xdna-driver/src/shim/kmq/../bo.h:8,
from /home/her/AMD/xdna-driver/src/shim/kmq/bo.h:7,
from /home/her/AMD/xdna-driver/src/shim/kmq/bo.cpp:4:
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:45: error: expected ‘;’ at end of member declaration
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^
| ;
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:60: error: ‘num_cus’ is not a type
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^~~~~~~
/home/her/AMD/xdna-driver/src/shim/../include/uapi/drm_local/amdxdna_accel.h:160:47: error: ISO C++ forbids declaration of ‘__counted_by’ with no type [-fpermissive]
160 | struct amdxdna_cu_config cu_configs[] __counted_by(num_cus);
| ^~~~~~~~~~~~
make[2]: *** [src/shim/CMakeFiles/xrt_driver_xdna.dir/build.make:104: src/shim/CMakeFiles/xrt_driver_xdna.dir/fence.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [src/shim/CMakeFiles/xrt_driver_xdna.dir/build.make:146: src/shim/CMakeFiles/xrt_driver_xdna.dir/pcidev.cpp.o] Error 1
make[2]: *** [src/shim/CMakeFiles/xrt_driver_xdna.dir/build.make:76: src/shim/CMakeFiles/xrt_driver_xdna.dir/bo.cpp.o] Error 1
make[2]: *** [src/shim/CMakeFiles/xrt_driver_xdna.dir/build.make:244: src/shim/CMakeFiles/xrt_driver_xdna.dir/umq/bo.cpp.o] Error 1
make[2]: *** [src/shim/CMakeFiles/xrt_driver_xdna.dir/build.make:132: src/shim/CMakeFiles/xrt_driver_xdna.dir/hwq.cpp.o] Error 1
make[2]: *** [src/shim/CMakeFiles/xrt_driver_xdna.dir/build.make:216: src/shim/CMakeFiles/xrt_driver_xdna.dir/kmq/hwq.cpp.o] Error 1
make[2]: *** [src/shim/CMakeFiles/xrt_driver_xdna.dir/build.make:230: src/shim/CMakeFiles/xrt_driver_xdna.dir/kmq/pcidev.cpp.o] Error 1
make[2]: *** [src/shim/CMakeFiles/xrt_driver_xdna.dir/build.make:160: src/shim/CMakeFiles/xrt_driver_xdna.dir/pcidrv.cpp.o] Error 1
make[2]: *** [src/shim/CMakeFiles/xrt_driver_xdna.dir/build.make:188: src/shim/CMakeFiles/xrt_driver_xdna.dir/kmq/device.cpp.o] Error 1
make[2]: *** [src/shim/CMakeFiles/xrt_driver_xdna.dir/build.make:258: src/shim/CMakeFiles/xrt_driver_xdna.dir/umq/device.cpp.o] Error 1
make[2]: *** [src/shim/CMakeFiles/xrt_driver_xdna.dir/build.make:202: src/shim/CMakeFiles/xrt_driver_xdna.dir/kmq/hwctx.cpp.o] Error 1
make[2]: *** [src/shim/CMakeFiles/xrt_driver_xdna.dir/build.make:118: src/shim/CMakeFiles/xrt_driver_xdna.dir/hwctx.cpp.o] Error 1
make[2]: *** [src/shim/CMakeFiles/xrt_driver_xdna.dir/build.make:174: src/shim/CMakeFiles/xrt_driver_xdna.dir/kmq/bo.cpp.o] Error 1
[ 94%] Linking CXX executable shim_test.elf
[ 94%] Built target shim_test.elf
make[2]: *** [src/shim/CMakeFiles/xrt_driver_xdna.dir/build.make:90: src/shim/CMakeFiles/xrt_driver_xdna.dir/device.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2443: src/shim/CMakeFiles/xrt_driver_xdna.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

real 0m19.769s
user 3m39.017s
sys 0m22.617s

have someone encountered the same problem before?

@maxzhen
Copy link
Collaborator

maxzhen commented Jan 3, 2025

Looks like __counted_by is added in 6.10. So, you need to update your kernel to at least 6.10.

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