Jump to content

    
jenya7

Портировать Pawn на малинку

Recommended Posts

4 hours ago, VladimirG said:

А с Pawn то какая проблема? Ради интереса с гитхаба склонировал проект, собрал и павн и амх либы  без проблем.

 

еще раз напишу то что написал в начале

кто нибудь работал с Pawn на ЛИНУКСЕ?

На КОНТРОЛЛЕРЕ запустить оказалось просто - нужно включить в проект несколько файлов.....

Share this post


Link to post
Share on other sites
On 1/17/2022 at 11:29 AM, jenya7 said:

с Линуксом сложней, в папке amx просто огроменная куча файлов.

Кто знает какие портировать в проект?

Зачем что-то портировать? После сборки на линуксе, все библиотеки из папки amx собраны в одном месте. Их прото подключить к проекту. -L/pathto/amxFile.so

amx/         amxDGram.so*  amxFixed.so*  amxProcess.so*  amxTime.so*     CMakeFiles/          compiler/  pawncc*   pawndisasm*  stategraph*
amxArgs.so*  amxFile.so*   amxFloat.so*  amxString.so*   CMakeCache.txt  cmake_install.cmake  Makefile   pawndbg*  pawnrun*

 

Share this post


Link to post
Share on other sites
40 minutes ago, VladimirG said:

Зачем что-то портировать? После сборки на линуксе, все библиотеки из папки amx собраны в одном месте. Их прото подключить к проекту. -L/pathto/amxFile.so


amx/         amxDGram.so*  amxFixed.so*  amxProcess.so*  amxTime.so*     CMakeFiles/          compiler/  pawncc*   pawndisasm*  stategraph*
amxArgs.so*  amxFile.so*   amxFloat.so*  amxString.so*   CMakeCache.txt  cmake_install.cmake  Makefile   pawndbg*  pawnrun*

 

я файлы подключил к проекту. но там вылетают ошибки.

например в amx.h на  #include <sclinux.h>  - file not found.

а это я вообще не понимаю

error: amx.o: undefined reference to symbol 'dlopen@@GLIBC_2.4'
error: /usr/lib/arm-linux-gnueabihf/libdl.so.2:
error adding symbols: DSO missing from command line

 

а как собрать? у меня там нет CMakeFiles.

Edited by jenya7

Share this post


Link to post
Share on other sites
git clone https://github.com/compuphase/pawn.git

cd pawn

mk dir build

cd build

cmake ../

make all -j4

Создай файл /etc/ld.so.conf.d/pawn.conf

в него впиши полный путь к папке build в которой будут so файлы.

Потом выполни ldconfig от рута

6 hours ago, jenya7 said:

например в amx.h на  #include <sclinux.h>  - file not found.

При сборке укажи -I/path_to_pawn/linux  там этот заголовочный файл.

6 hours ago, jenya7 said:

error: amx.o: undefined reference to symbol 'dlopen@@GLIBC_2.4'

библиотека -ldl если память не изменяет. 

Edited by VladimirG

Share this post


Link to post
Share on other sites
On 1/20/2022 at 10:44 PM, VladimirG said:

git clone https://github.com/compuphase/pawn.git

cd pawn

mk dir build

cd build

cmake ../

make all -j4

Создай файл /etc/ld.so.conf.d/pawn.conf

в него впиши полный путь к папке build в которой будут so файлы.

Потом выполни ldconfig от рута

При сборке укажи -I/path_to_pawn/linux  там этот заголовочный файл.

библиотека -ldl если память не изменяет. 

 

на cmake ../ получаю кучу ошибок

Spoiler
Quote

pi@raspberrypi:~/pawn $ cd build
pi@raspberrypi:~/pawn/build $ cmake ../
CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineSystem.cmake:173 (file):
  file failed to open for writing (No such file or directory):

    /home/pi/pawn/build/CMakeFiles/CMakeOutput.log
Call Stack (most recent call first):
  CMakeLists.txt:4 (PROJECT)


CMake Error: Could not open file for write in copy operation /home/pi/pawn/build/CMakeFiles/3.16.3/CMakeSystem.cmake.tmp
CMake Error: : System Error: No such file or directory
CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineSystem.cmake:185 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:4 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /home/pi/pawn/build/CMakeFiles/3.16.3/CompilerIdC
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:4 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /home/pi/pawn/build/CMakeFiles/3.16.3/CompilerIdC
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:4 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /home/pi/pawn/build/CMakeFiles/3.16.3/CompilerIdC
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:4 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /home/pi/pawn/build/CMakeFiles/3.16.3/CompilerIdC
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:4 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /home/pi/pawn/build/CMakeFiles/3.16.3/CompilerIdC
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:4 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /home/pi/pawn/build/CMakeFiles/3.16.3/CompilerIdC
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:4 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /home/pi/pawn/build/CMakeFiles/3.16.3/CompilerIdC
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:4 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /home/pi/pawn/build/CMakeFiles/3.16.3/CompilerIdC
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:4 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /home/pi/pawn/build/CMakeFiles/3.16.3/CompilerIdC
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:4 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /home/pi/pawn/build/CMakeFiles/3.16.3/CompilerIdC
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:4 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:879 (file):
  file failed to open for writing (No such file or directory):

    /home/pi/pawn/build/CMakeFiles/CMakeError.log
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:60 (CMAKE_DETERMINE_COMPILER_ID_VENDOR)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:4 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:879 (file):
  file failed to open for writing (No such file or directory):

    /home/pi/pawn/build/CMakeFiles/CMakeError.log
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:60 (CMAKE_DETERMINE_COMPILER_ID_VENDOR)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:4 (PROJECT)


-- The C compiler identification is unknown
CMake Error: Could not open file for write in copy operation /home/pi/pawn/build/CMakeFiles/3.16.3/CMakeCCompiler.cmake.tmp
CMake Error: : System Error: No such file or directory
CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:212 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:4 (PROJECT)


CMake Error: Could not find cmake module file: /home/pi/pawn/build/CMakeFiles/3.16.3/CMakeCCompiler.cmake
CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /home/pi/pawn/build/CMakeFiles/3.16.3/CompilerIdCXX
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:4 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /home/pi/pawn/build/CMakeFiles/3.16.3/CompilerIdCXX
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:4 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /home/pi/pawn/build/CMakeFiles/3.16.3/CompilerIdCXX
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:4 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /home/pi/pawn/build/CMakeFiles/3.16.3/CompilerIdCXX
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:4 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /home/pi/pawn/build/CMakeFiles/3.16.3/CompilerIdCXX
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:4 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /home/pi/pawn/build/CMakeFiles/3.16.3/CompilerIdCXX
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:4 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /home/pi/pawn/build/CMakeFiles/3.16.3/CompilerIdCXX
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:4 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /home/pi/pawn/build/CMakeFiles/3.16.3/CompilerIdCXX
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:4 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /home/pi/pawn/build/CMakeFiles/3.16.3/CompilerIdCXX
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:4 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /home/pi/pawn/build/CMakeFiles/3.16.3/CompilerIdCXX
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:4 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:879 (file):
  file failed to open for writing (No such file or directory):

    /home/pi/pawn/build/CMakeFiles/CMakeError.log
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:60 (CMAKE_DETERMINE_COMPILER_ID_VENDOR)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:4 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:879 (file):
  file failed to open for writing (No such file or directory):

    /home/pi/pawn/build/CMakeFiles/CMakeError.log
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:60 (CMAKE_DETERMINE_COMPILER_ID_VENDOR)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:4 (PROJECT)


-- The CXX compiler identification is unknown
CMake Error: Could not open file for write in copy operation /home/pi/pawn/build/CMakeFiles/3.16.3/CMakeCXXCompiler.cmake.tmp
CMake Error: : System Error: No such file or directory
CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:210 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:4 (PROJECT)


CMake Error: Could not find cmake module file: /home/pi/pawn/build/CMakeFiles/3.16.3/CMakeCXXCompiler.cmake
-- Check for working C compiler: /usr/bin/cc
CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:32 (file):
  file failed to open for writing (No such file or directory):

    /home/pi/pawn/build/CMakeFiles/CMakeTmp/testCCompiler.c
Call Stack (most recent call first):
  CMakeLists.txt:4 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:44 (try_compile):
  Unknown extension ".c" for file

    /home/pi/pawn/build/CMakeFiles/CMakeTmp/testCCompiler.c

  try_compile() works only for enabled languages.  Currently these are:

    C CXX

  See project() command to enable other languages.
Call Stack (most recent call first):
  CMakeLists.txt:4 (PROJECT)


-- Check for working C compiler: /usr/bin/cc -- broken
CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:56 (file):
  file failed to open for writing (No such file or directory):

    /home/pi/pawn/build/CMakeFiles/CMakeError.log
Call Stack (most recent call first):
  CMakeLists.txt:4 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):
  The C compiler

    "/usr/bin/cc"

  is not able to compile a simple test program.

  It fails with the following output:

    

 

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:4 (PROJECT)


-- Configuring incomplete, errors occurred!
CMake Error: Cannot open file for write: /home/pi/pawn/build/CMakeCache.txt.tmp
CMake Error: : System Error: Permission denied
CMake Error: Unable to open cache file for save. /home/pi/pawn/build/CMakeCache.txt
CMake Error: : System Error: Permission denied

 

 

 

Share this post


Link to post
Share on other sites
4 часа назад, jenya7 сказал:

ну я root вообще то.

странно, что cmake не может создавать файлы, ну вот первая ошибка CMakeOutput.log это просто его лог

Share this post


Link to post
Share on other sites
12 hours ago, jenya7 said:

не суть. так тоже не работает

sudo cmake ../

Попробуйте sudo su

Удалить папку билд, создать заново и  потом cmake ../

С файловой системой всё впорядке? Места достаточно?

Share this post


Link to post
Share on other sites
11 hours ago, VladimirG said:

Попробуйте sudo su

Удалить папку билд, создать заново и  потом cmake ../

С файловой системой всё впорядке? Места достаточно?

SD 32Gb. место есть.

Share this post


Link to post
Share on other sites
20 hours ago, VladimirG said:

Ради интереса достал малинку из ящика.

Всё собралось без единой ошибки и под пользователем pi

 

спасибо. sudo su помогло. а как теперь *.so  в проект включить в Qt?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.