webMAN-MOD
webMAN-MOD copied to clipboard
[Question] how to compile on Mac OS X Lion without Meson?
Mine is an old mac mini mid 2007, only capable of running OSX Lion 10.7.5
I can't run python3 gives a segmentation error, so I cannot install meson.
I do have xcode and I tried running make but I got an error. Something about windows idk.
Then I tried renaming the makefile.macos to makefile and I got another error.
This time it says:
fatal error: 'endian.h' file not found. #include <endian.h> ^ 1 error generated. Make: *** [src/main.o] Error 1
Try changing #include <endian.h
> to #include <sys/types.h>
Vladimir Stolyarov @xakep666 submitted a fix for this issue on Jan 4, 2021 This is the commit: https://github.com/aldostools/webMAN-MOD/commit/1b6ec2725b0d08c46acec6268948e56f3776267e
Inside the makefile ?
No, in the file include/common.h Check the commit: https://github.com/aldostools/webMAN-MOD/commit/1b6ec2725b0d08c46acec6268948e56f3776267e
Ok, now it gives 2 errors
heres the error
https://pastebin.com/CDMMPS57
I was trying the dumb way, idk, sounds dumb, I twas saying file not found so i was searching for them sources and adding them to the folder, and one next one starting with the endian.h
this is what i was trying
https://pastebin.com/3ATUFF3s
Please use the latest commit in ps3netsrv folder of the Projects
You probably are using ps3netsrv_20200708.zip that is from July 8, 2020.
The error in your pastebin clearly says: ./include/common.h:14:10: fatal error: 'endian.h' file not found
That means that you didn't change what I have already told you 3 times
oh no, that was what I WAS trying, before asking.
Ok, so i downloaded the new version you linked me.
renamed the makefile.macos to makefile and got this when running make
Lions-Mac-mini:ps3netsrv lion$ make
g++ -Wall -Wno-format -I./include -std=c++0x -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DPOLARSSL -D_OS_WINDOWS -DWIN32 -static -O3 -DNDEBUG -c -o src/main.o src/main.cpp
cc1plus: error: unrecognized command line option "-std=c++0x"
make: *** [src/main.o] Error 1
Lions-Mac-mini:ps3netsrv lion$ make
c++ -Wall -Wno-format -I./include -std=c++0x -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DPOLARSSL -Doff64_t=off_t -O3 -DNDEBUG -c -o src/main.o src/main.cpp
src/main.cpp:2:10: fatal error: 'cstdint' file not found
#include
You are compiling with the default Makefile
that is for Windows
See the command line says: -D_OS_WINDOWS -DWIN32
Use Makefile.macos
Oh I see you renamed the file. Try the Makefile.linux
but I renamed the makefile.macos to makefile alredy, isnt supposed to be using that file alredy?
ok, im gonna try the linux one
Lions-Mac-mini:ps3netsrv lion$ make
c++ -Wall -Wno-format -I./include -std=c++0x -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DPOLARSSL -Doff64_t=off_t -static -O3 -DNDEBUG -c -o src/main.o src/main.cpp
src/main.cpp:2:10: fatal error: 'cstdint' file not found
#include
i think its the same error no?
I checked Makefile.macos
and the flags -D_OS_WINDOWS -DWIN32
are used only if OS = 'windows'
You probably didn't use the correct file.
Extract the zip again, do not rename anything and try: make -f Makefile.macos
No, i was using it correctly, had no idea you could choose other makefiles with the -f flag thou.
heres the paste
Lions-Mac-mini:ps3netsrv lion$ make -f Makefile.macos
c++ -Wall -Wno-format -I./include -std=c++0x -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DPOLARSSL -Doff64_t=off_t -O3 -DNDEBUG -c -o src/main.o src/main.cpp
src/main.cpp:2:10: fatal error: 'cstdint' file not found
#include
Ok, in this case you will have to wait for help from another developer with experience in MacOS. This makefile haven't been changed in ages and no one have reported errors using it.
Maybe some missing files in your compiler?
well thats a possibility, its xcode 4.6 i think, on a 2007 OS, so actual missing files are a possibility.
im gonna resume what i was doing by downloading the missing files one by one, i just hope i dont take a year doing that.
erm, i resumed from the other folder the outdated one, and kept downloading the missing files and reached this point where no other files are missing but i got this huge error now.
what do you think?
Lions-Mac-mini:ps3netsrv lion$ make c++ -Wall -I./include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DPOLARSSL -Doff64_t=off_t -c -o src/VIsoFile.o src/VIsoFile.cpp In file included from src/VIsoFile.cpp:7: In file included from ./include/common.h:14: ./include/endian.h:46:10: warning: 'LITTLE_ENDIAN' macro redefined
define LITTLE_ENDIAN __LITTLE_ENDIAN
^
/usr/include/i386/endian.h:93:9: note: previous definition is here #define LITTLE_ENDIAN __DARWIN_LITTLE_ENDIAN ^ In file included from src/VIsoFile.cpp:7: In file included from ./include/common.h:14: ./include/endian.h:47:10: warning: 'BIG_ENDIAN' macro redefined
define BIG_ENDIAN __BIG_ENDIAN
^
/usr/include/i386/endian.h:94:9: note: previous definition is here #define BIG_ENDIAN __DARWIN_BIG_ENDIAN ^ In file included from src/VIsoFile.cpp:7: In file included from ./include/common.h:14: ./include/endian.h:48:10: warning: 'PDP_ENDIAN' macro redefined
define PDP_ENDIAN __PDP_ENDIAN
^
/usr/include/i386/endian.h:95:9: note: previous definition is here #define PDP_ENDIAN __DARWIN_PDP_ENDIAN ^ In file included from src/VIsoFile.cpp:7: In file included from ./include/common.h:14: ./include/endian.h:49:10: warning: 'BYTE_ORDER' macro redefined
define BYTE_ORDER __BYTE_ORDER
^
/usr/include/i386/endian.h:97:9: note: previous definition is here #define BYTE_ORDER __DARWIN_BYTE_ORDER ^ src/VIsoFile.cpp:421:22: error: use of undeclared identifier 'DT_DIR' if (entry->d_type & DT_DIR) ^ src/VIsoFile.cpp:438:22: error: use of undeclared identifier 'DT_DIR' if (entry->d_type & DT_DIR) ^ src/VIsoFile.cpp:1128:61: error: use of undeclared identifier 'alphasort' count = scandir(dirList->path, &dirs, select_directories, alphasort); ^ src/VIsoFile.cpp:1165:56: error: use of undeclared identifier 'alphasort' count = scandir(dirList->path, &files, select_files, alphasort); ^ 4 warnings and 4 errors generated. make: *** [src/VIsoFile.o] Error 1 Lions-Mac-mini:ps3netsrv lion$
put that on a pastebin bc it got a lil weird to read from.
https://pastebin.com/wWp5YwXj
idk I see some stuff talking about darwin which is the core of mac os, instead of Linux, maybe its because the stuff im using from linux ? idk im kinda lost.
I also tried compiling on linux and running on mac and got this
Lions-Mac-mini:ps3netsrv lion$ ./ps3netsrv.x86 -bash: ./ps3netsrv.x86: cannot execute binary file
i didnt expected to work but expected some more info, but no :/
@Lion4K I've also tired of mac os and cross-compilation problems and written a minimal server implementation in go (https://github.com/xakep666/ps3netsrv-go/releases/tag/v0.0.1) Maybe it helps you :)