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

Port to Linux #2

Open
elasota opened this issue Mar 16, 2021 · 8 comments
Open

Port to Linux #2

elasota opened this issue Mar 16, 2021 · 8 comments
Labels
good first issue Good for newcomers

Comments

@elasota
Copy link
Owner

elasota commented Mar 16, 2021

Port to Linux. This may be fairly straightforward since there's already a working Cygwin version.

@elasota elasota added the good first issue Good for newcomers label Mar 16, 2021
@ghost
Copy link

ghost commented Apr 8, 2021

I'll check out this issue this weekend to see if I can contribute. I'll let you know how it goes. Thank you so much for making this port!

@elasota
Copy link
Owner Author

elasota commented Apr 8, 2021

Okay, probably good start would be just do "cmake ." + "make install" and see if it works with the 1.1.0 pre-release 1 data. It's already working with Cygwin, so there's a chance that's all it needs.

@elasota elasota assigned ghost Apr 8, 2021
@ghost
Copy link

ghost commented Apr 15, 2021

I've been checking the project, reading the code and getting used to it's organization. It compiles with very minor changes on Ubuntu 18.04, but it crashes when attempting to link the GLSL shaders. I'll keep you posted when I find out what's the issue.

@voltagex
Copy link

@miky-kr5 are you able to push what you've done to a branch?

@HolographicDoll
Copy link

Okay, I did an out-of-the-box "git clone" + "cmake ." + "make install" on Ubuntu 22.04.

Here's what I got:

~/Downloads/Aerofoil/AerofoilX/GpSystemServices_X.cpp: In member function 'virtual void* GpSystemServices_X::CreateThread(IGpSystemServices::ThreadFunc_t, void*)':  
~/Downloads/Aerofoil/AerofoilX/GpSystemServices_X.cpp:60:28: error: cannot convert 'std::nullptr_t' to 'pthread_t' {aka 'long unsigned int'} in initialization  
   60 |         pthread_t thread = nullptr;  
      |                            ^~~~~~~  
~/Downloads/Aerofoil/AerofoilX/GpSystemServices_X.cpp:70:16: error: invalid conversion from 'pthread_t' {aka 'long unsigned int'} to 'void*' [-fpermissive]  
   70 |         return thread;  
      |                ^~~~~~  
      |                |  
      |                pthread_t {aka long unsigned int}  
make[2]: *** [CMakeFiles/AerofoilX.dir/build.make:258: CMakeFiles/AerofoilX.dir/AerofoilX/GpSystemServices_X.cpp.o] Error 1  
make[1]: *** [CMakeFiles/Makefile2:261: CMakeFiles/AerofoilX.dir/all] Error 2  
make: *** [Makefile:136: all] Error 2

@ghost
Copy link

ghost commented May 21, 2023

Any news on this?

@elasota
Copy link
Owner Author

elasota commented May 22, 2023

I've pushed a change that should hopefully fix the pthread_t problem

@HolographicDoll
Copy link

HolographicDoll commented May 22, 2023

Attempted to compile just now with the change. pthread_t is fixed, but I got new errors:

~/Aerofoil/AerofoilX/GpFileSystem_X.cpp:113:16: error: ‘fseek64’ was not declared in this scope; did you mean ‘lseek64’?
  113 |         return fseek64(m_f, static_cast<off64_t>(loc), SEEK_SET) >= 0;
      |                ^~~~~~~
      |                lseek64
~/Aerofoil/AerofoilX/GpFileSystem_X.cpp: In member function ‘virtual bool GpFileStream_X_File::SeekCurrent(GpFilePos_t)’:
~/Aerofoil/AerofoilX/GpFileSystem_X.cpp:122:16: error: ‘fseek64’ was not declared in this scope; did you mean ‘lseek64’?
  122 |         return fseek64(m_f, static_cast<off64_t>(loc), SEEK_CUR) >= 0;
      |                ^~~~~~~
      |                lseek64
~/Aerofoil/AerofoilX/GpFileSystem_X.cpp: In member function ‘virtual bool GpFileStream_X_File::SeekEnd(GpUFilePos_t)’:
~/Aerofoil/AerofoilX/GpFileSystem_X.cpp:131:16: error: ‘fseek64’ was not declared in this scope; did you mean ‘lseek64’?
  131 |         return fseek64(m_f, -static_cast<off64_t>(loc), SEEK_END) >= 0;
        |                ^~~~~~~
        |                lseek64
make[2]: *** [CMakeFiles/AerofoilX.dir/build.make:272: CMakeFiles/AerofoilX.dir/AerofoilX/GpFileSystem_X.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:261: CMakeFiles/AerofoilX.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Looks like there just needs to be a || (__linux__) added to the if on line 30, however, if I do that and try again, I get:

/usr/bin/ld: cannot open output file AerofoilX: Is a directory
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/AerofoilX.dir/build.make:327: AerofoilX] Error 1
make[1]: *** [CMakeFiles/Makefile2:261: CMakeFiles/AerofoilX.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants