Hi. I'm trying to build the Mednafen package (the one in app-emulation/mednafen), but when executing the command:
haikuporter --get-dependencies -S mednafen_x86
I get the following error:
g++ -std=gnu++11 -fsigned-char -DLOCALEDIR=\"/packages/mednafen_x86-1.22.1-1/.self/data/locale\" -DHAVE_CONFIG_H -D_REENTRANT -I/packages/libsdl2_x86-2.0.10-1/.self/develop/headers/x86/SDL2 -I../../include -I../../include -I../../intl -fno-fast-math -fno-unsafe-math-optimizations -fno-aggressive-loop-optimizations -fno-ipa-icf -fno-printf-return-value -fomit-frame-pointer -fstrict-aliasing -Wall -Wshadow -Wempty-body -Wignored-qualifiers -Wvla -Wvariadic-macros -Wdisabled-optimization -Werror=write-strings -fwrapv -fjump-tables -mfunction-return=keep -mindirect-branch=keep -mno-indirect-branch-register -fexceptions -g -O2 -MT main.o -MD -MP -MF $depbase.Tpo -c -o main.o main.cpp &&\
mv -f $depbase.Tpo $depbase.Po
depbase=echo args.o | sed 's|[^/]*$|.deps/&|;s|\.o$||';\
g++ -std=gnu++11 -fsigned-char -DLOCALEDIR=\"/packages/mednafen_x86-1.22.1-1/.self/data/locale\" -DHAVE_CONFIG_H -D_REENTRANT -I/packages/libsdl2_x86-2.0.10-1/.self/develop/headers/x86/SDL2 -I../../include -I../../include -I../../intl -fno-fast-math -fno-unsafe-math-optimizations -fno-aggressive-loop-optimizations -fno-ipa-icf -fno-printf-return-value -fomit-frame-pointer -fstrict-aliasing -Wall -Wshadow -Wempty-body -Wignored-qualifiers -Wvla -Wvariadic-macros -Wdisabled-optimization -Werror=write-strings -fwrapv -fjump-tables -mfunction-return=keep -mindirect-branch=keep -mno-indirect-branch-register -fexceptions -g -O2 -MT args.o -MD -MP -MF $depbase.Tpo -c -o args.o args.cpp &&\
mv -f $depbase.Tpo $depbase.Po
In file included from ../../include/mednafen/mednafen.h:4,
from ../../include/mednafen/driver.h:4,
from main.h:4,
from main.cpp:18:
../../include/mednafen/types.h:27:4: error: #error "Compiling with position-independent code generation enabled is not recommended, for performance reasons."
#error "Compiling with position-independent code generation enabled is not recommended, for performance reasons."
^~~~~
In file included from args.cpp:26:
../../include/mednafen/types.h:27:4: error: #error "Compiling with position-independent code generation enabled is not recommended, for performance reasons."
#error "Compiling with position-independent code generation enabled is not recommended, for performance reasons."
^
Makefile:549: recipe for target 'args.o' failed
make[2]: * [args.o] Error 1
make[2]: Waiting for unfinished jobs....
Makefile:549: recipe for target 'main.o' failed
make[2]: [main.o] Error 1
make[2]: Leaving directory '/sources/mednafen/src/drivers'
Makefile:4946: recipe for target 'all-recursive' failed
make[1]: [all-recursive] Error 1
make[1]: Leaving directory '/sources/mednafen/src'
Makefile:472: recipe for target 'all-recursive' failed
make: ** [all-recursive] Error 1
Warning: Command '['bash', '-c', '. /wrapper-script']' returned non-zero exit status 2
Error: Build has failed - stopping.
Sorry, I messed up the build log. There is again:
g++ -std=gnu++11 -fsigned-char -DLOCALEDIR=\"/packages/mednafen_x86-1.22.1-1/.self/data/locale\" -DHAVE_CONFIG_H -D_REENTRANT -I/packages/libsdl2_x86-2.0.10-1/.self/develop/headers/x86/SDL2 -I../../include -I../../include -I../../intl -fno-fast-math -fno-unsafe-math-optimizations -fno-aggressive-loop-optimizations -fno-ipa-icf -fno-printf-return-value -fomit-frame-pointer -fstrict-aliasing -Wall -Wshadow -Wempty-body -Wignored-qualifiers -Wvla -Wvariadic-macros -Wdisabled-optimization -Werror=write-strings -fwrapv -fjump-tables -mfunction-return=keep -mindirect-branch=keep -mno-indirect-branch-register -fexceptions -g -O2 -MT main.o -MD -MP -MF $depbase.Tpo -c -o main.o main.cpp &&\
mv -f $depbase.Tpo $depbase.Po
depbase=echo args.o | sed 's|[^/]*$|.deps/&|;s|\.o$||';\
g++ -std=gnu++11 -fsigned-char -DLOCALEDIR=\"/packages/mednafen_x86-1.22.1-1/.self/data/locale\" -DHAVE_CONFIG_H -D_REENTRANT -I/packages/libsdl2_x86-2.0.10-1/.self/develop/headers/x86/SDL2 -I../../include -I../../include -I../../intl -fno-fast-math -fno-unsafe-math-optimizations -fno-aggressive-loop-optimizations -fno-ipa-icf -fno-printf-return-value -fomit-frame-pointer -fstrict-aliasing -Wall -Wshadow -Wempty-body -Wignored-qualifiers -Wvla -Wvariadic-macros -Wdisabled-optimization -Werror=write-strings -fwrapv -fjump-tables -mfunction-return=keep -mindirect-branch=keep -mno-indirect-branch-register -fexceptions -g -O2 -MT args.o -MD -MP -MF $depbase.Tpo -c -o args.o args.cpp &&\
mv -f $depbase.Tpo $depbase.Po
In file included from ../../include/mednafen/mednafen.h:4,
from ../../include/mednafen/driver.h:4,
from main.h:4,
from main.cpp:18:
../../include/mednafen/types.h:27:4: error: #error "Compiling with position-independent code generation enabled is not recommended, for performance reasons."
#error "Compiling with position-independent code generation enabled is not recommended, for performance reasons."
^~~~~
In file included from args.cpp:26:
../../include/mednafen/types.h:27:4: error: #error "Compiling with position-independent code generation enabled is not recommended, for performance reasons."
#error "Compiling with position-independent code generation enabled is not recommended, for performance reasons."
^
Makefile:549: recipe for target 'args.o' failed
make[2]: * [args.o] Error 1
make[2]: Waiting for unfinished jobs....
Makefile:549: recipe for target 'main.o' failed
make[2]: [main.o] Error 1
make[2]: Leaving directory '/sources/mednafen/src/drivers'
Makefile:4946: recipe for target 'all-recursive' failed
make[1]: [all-recursive] Error 1
make[1]: Leaving directory '/sources/mednafen/src'
Makefile:472: recipe for target 'all-recursive' failed
make: ** [all-recursive] Error 1
Warning: Command '['bash', '-c', '. /wrapper-script']' returned non-zero exit status 2
Error: Build has failed - stopping.
This specific error is replaced with a warning in 1.22.2, but some errors come later. They require a lot of patches, no motivation for this. This is the same with all releases (1.22; 1.24; 1.26)
Build is still running by adding a line before 27 in types.h "#elif !defined(__HAIKU__)", this moves from the error to the warning, not sure as it isn't finished yet, but so far looking good (for current version in haikuports)
EDIT this should be __ HAIKU __ (without the spaces between) :)
Build is still running by adding a line before 27 in types.h "#elif !defined(HAIKU)", this moves from the error to the warning, not sure as it isn't finished yet, but so far looking good (for current version in haikuports)
EDIT this should be __ HAIKU __ (without the spaces between) :)
Are you on x86?
gcc2hybrid (secondary architecture), but not there yet :)
Stuck at "Joystick.cpp:501:39: error: call of overloaded 'MDFN_log2(unsigned int)' is ambiguous" atm (had conflicting type for int32 and uint32 before this ...
I would bump the version, enable x86_64 if it builds/works. Then marks x86 as broken and close this issue as "won't fix".