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

Cannot build on ArchLinux 64bit #2

Closed
minhnhdo opened this issue Nov 2, 2012 · 7 comments
Closed

Cannot build on ArchLinux 64bit #2

minhnhdo opened this issue Nov 2, 2012 · 7 comments

Comments

@minhnhdo
Copy link
Contributor

minhnhdo commented Nov 2, 2012

Solution:

  • Directly #include <cstring> or #include <cstdio> into the offending files

or

  • Centralize the missing #includes into one file and include this file in the offending files

Error log:

$ ./b.sh 
-- Configuring done
-- Generating done
-- Build files have been written to: /media/data/Documents/Workplace/ppsspp/SDL/build
[  0%] [  0%] Building CXX object gfx/CMakeFiles/gfx.dir/texture_gen.cpp.o
Building CXX object base/CMakeFiles/base.dir/PCMain.cpp.o
Scanning dependencies of target core
/media/data/Documents/Workplace/ppsspp/native/gfx/texture_gen.cpp: In function ‘uint8_t* generateTexture(const char*, int&, int&, int&, bool&)’:
/media/data/Documents/Workplace/ppsspp/native/gfx/texture_gen.cpp:17:21: error: ‘strlen’ was not declared in this scope
/media/data/Documents/Workplace/ppsspp/native/gfx/texture_gen.cpp:22:41: error: ‘strcmp’ was not declared in this scope
make[2]: *** [gfx/CMakeFiles/gfx.dir/texture_gen.cpp.o] Error 1
make[1]: *** [gfx/CMakeFiles/gfx.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[  0%] [  1%] Building CXX object Core/CMakeFiles/core.dir/Debugger/Breakpoints.cpp.o
Building CXX object Core/CMakeFiles/core.dir/MIPS/MIPSDebugInterface.cpp.o
/media/data/Documents/Workplace/ppsspp/native/base/PCMain.cpp: In function ‘int main(int, char**)’:
/media/data/Documents/Workplace/ppsspp/native/base/PCMain.cpp:235:40: error: ‘getuid’ was not declared in this scope
make[2]: *** [base/CMakeFiles/base.dir/PCMain.cpp.o] Error 1
make[1]: *** [base/CMakeFiles/base.dir/all] Error 2
[  2%] Building CXX object Core/CMakeFiles/core.dir/MIPS/MIPSDisVFPU.cpp.o
/media/data/Documents/Workplace/ppsspp/Core/Debugger/Breakpoints.cpp: In member function ‘void MemCheck::Action(u32, u32, bool, int, u32)’:
/media/data/Documents/Workplace/ppsspp/Core/Debugger/Breakpoints.cpp:42:161: error: ‘printf’ was not declared in this scope
In file included from /media/data/Documents/Workplace/ppsspp/Core/Debugger/Breakpoints.cpp:21:0:
/media/data/Documents/Workplace/ppsspp/SDL/../Common/FixedSizeUnorderedSet.h: In instantiation of ‘bool FixedSizeUnorderedSet<T, maxCount>::insert(T) [with T = BreakPoint; long unsigned int maxCount = 16ul]’:
/media/data/Documents/Workplace/ppsspp/Core/Debugger/Breakpoints.cpp:124:27:   required from here
/media/data/Documents/Workplace/ppsspp/SDL/../Common/FixedSizeUnorderedSet.h:13:5: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
make[2]: *** [Core/CMakeFiles/core.dir/Debugger/Breakpoints.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /media/data/Documents/Workplace/ppsspp/Core/MIPS/MIPSDebugInterface.cpp:20:0:
/media/data/Documents/Workplace/ppsspp/Core/MIPS/../Debugger/DebugInterface.h: In member function ‘virtual void DebugInterface::DisAsm(u32, u32, int, char*)’:
/media/data/Documents/Workplace/ppsspp/Core/MIPS/../Debugger/DebugInterface.h:50:93: error: ‘sprintf’ was not declared in this scope
/media/data/Documents/Workplace/ppsspp/Core/MIPS/../Debugger/DebugInterface.h: In member function ‘virtual void DebugInterface::PrintRegValue(int, int, char*)’:
/media/data/Documents/Workplace/ppsspp/Core/MIPS/../Debugger/DebugInterface.h:58:42: error: ‘sprintf’ was not declared in this scope
make[2]: *** [Core/CMakeFiles/core.dir/MIPS/MIPSDebugInterface.cpp.o] Error 1
make[1]: *** [Core/CMakeFiles/core.dir/all] Error 2
make: *** [all] Error 2
@hrydgard
Copy link
Owner

hrydgard commented Nov 2, 2012

Keep sending pull requests with fixes :)

@minhnhdo
Copy link
Contributor Author

minhnhdo commented Nov 2, 2012

Do you want me to include the missing header into each file? Or do you prefer a centralized include?

@hrydgard
Copy link
Owner

hrydgard commented Nov 2, 2012

Oh sorry, missed that you were asking a question.

Please add them to all of the files, centralized includes tend to grow over time and slow down the build.

It's odd that this include problem isn't an issue on Mac or Android, it builds fine on those..

@minhnhdo
Copy link
Contributor Author

minhnhdo commented Nov 2, 2012

I suspect the compiler implicitly links the program with stdlib functions

@minhnhdo
Copy link
Contributor Author

minhnhdo commented Nov 3, 2012

after fixing a bunch of missing #includes and missing CMake linking directives, I'm able to run the program. However, running the program (./SDL/build/ppsspp) would only give me a blocky splash screen in the emulator, followed by a blocky menu. Is this intended?

@hrydgard
Copy link
Owner

hrydgard commented Nov 3, 2012

No, it should work - it needs assets/ui_atlas.zim to be accessible though so you need to run it from the right directory. I hope to find some way to build the graphics into the binary later.

(try running ./buildassets.sh in /SDL to copy over the atlas from the android directory. yeah I know this is a bit silly)

@minhnhdo
Copy link
Contributor Author

minhnhdo commented Nov 4, 2012

it runs perfectly after I have copied the assets/ folder into the same folder containing ppsspp executable.

@minhnhdo minhnhdo closed this as completed Nov 4, 2012
hrydgard pushed a commit that referenced this issue Mar 9, 2013
@livisor livisor mentioned this issue Mar 9, 2013
hrydgard pushed a commit that referenced this issue Apr 1, 2013
unknownbrackets added a commit that referenced this issue Jul 28, 2013
Fix issues in virtual disc filesystem.
hrydgard pushed a commit that referenced this issue Aug 30, 2013
Bigpet pushed a commit to Bigpet/ppsspp that referenced this issue Sep 9, 2014
netAdhocctlInited should be true when return success
hrydgard pushed a commit that referenced this issue Jan 16, 2019
hrydgard pushed a commit that referenced this issue Jan 8, 2021
@anr2me anr2me mentioned this issue Jul 25, 2021
17 tasks
hrydgard added a commit that referenced this issue Sep 4, 2022
… textures participating in small-resolution passes.
@hsoftxl hsoftxl mentioned this issue Mar 7, 2024
6 tasks
hrydgard added a commit that referenced this issue May 24, 2024
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