I wonder what's wrong with it, I added myself /opt/devkitpro/devkitARM/bin:/opt/devkitpro/portlibs/3ds/bin:/opt/devkitpro/portlibs/armv6k/bin to the PATH (env var)
Is it correct to separate paths with a ":" char? on widwows it's a ";".
I wonder what's wrong with it, I added myself /opt/devkitpro/devkitARM/bin:/opt/devkitpro/portlibs/3ds/bin:/opt/devkitpro/portlibs/armv6k/bin to the PATH (env var)
Yes. I'm thinking he's not properly setting the variable though, and isn't including /bin and /usr in his PATH.Is it correct to separate paths with a ":" char? on widwows it's a ";".
Yes. I'm thinking he's not properly setting the variable though, and isn't including /bin and /usr in his PATH.
pedro4@pedroSystem ~/Repositories/SDL-3DS $ echo $PATH
/opt/devkitpro/devkitARM/bin:/opt/devkitpro/portlibs/3ds/bin:/opt/devkitpro/portlibs/armv6k/bin:/home/pedro4/bin:/home/pedro4/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
That certainly worked! How did I not come up with that before? Thank you!
Now I'm getting this new error:
Code:checking for arm-none-eabi-gcc... no checking for gcc... gcc checking whether the C compiler works... no
I wonder what's wrong with it, I added myself /opt/devkitpro/devkitARM/bin:/opt/devkitpro/portlibs/3ds/bin:/opt/devkitpro/portlibs/armv6k/bin to the PATH (env var) and if I type
Code:arm-none-eabi-gcc
I get this:
Code:arm-none-eabi-gcc: fatal error: no input files compilation terminated.
So that confirms there's nothing wrong with the PATH.
If I don't use sudo, I have permission issues; if I use it, path won't propagte. I guess I'll modify root's PATH var.Are you still using sudo after fixing the x bit? The path won't propagate if you use sudo
If I don't use sudo, I have permission issues; if I use it, path won't propagte. I guess I'll modify root's PATH var.
That worked, although got a bunch of warnings through the process and got an error with SDL_ttf (guess it's because I don't have freetype installed from 3ds_portlibs?) I'm going to make sure it was installed correctly by compiling a 3ds project which includes SDL/SDL.h thoNo, don't do that. What permission errors are you getting?
sudo -E will preserve environment though.
In file included from /usr/include/SDL/SDL_main.h:26:0,
from /usr/include/SDL/SDL.h:30,
from SDL_ttf.c:46:
/usr/include/SDL/SDL_stdinc.h:123:20: error: size of array 'SDL_dummy_enum' is negative
typedef int SDL_dummy_ ## name[(x) * 2 - 1]
^
/usr/include/SDL/SDL_stdinc.h:151:1: note: in expansion of macro 'SDL_COMPILE_TIME_ASSERT'
SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
^~~~~~~~~~~~~~~~~~~~~~~
SDL_ttf.c: In function 'UTF8_to_UNICODE':
SDL_ttf.c:943:11: warning: overflow in implicit constant conversion [-Woverflow]
ch = (Uint16)(utf8[i]&0x07) << 18;
^
Makefile:545: fallo en las instrucciones para el objetivo 'SDL_ttf.lo'
make[1]: *** [SDL_ttf.lo] Error 1
make[1]: se sale del directorio '/home/pedro4/Repositories/SDL-3DS/SDL_ttf-2.0.11'
Makefile:92: fallo en las instrucciones para el objetivo 'SDL_ttf'
make: *** [SDL_ttf] Error 2
That worked, although got a bunch of warnings through the process and got an error with SDL_ttf (guess it's because I don't have freetype installed from 3ds_portlibs?) I'm going to make sure it was installed correctly by compiling a 3ds project which includes SDL/SDL.h tho
EDIT:
I installed some portlibs (zlib, bzip2, libpng and freetype) and got a new error related to SDL_ttf (the one I got before editing is now gone):
Code:In file included from /usr/include/SDL/SDL_main.h:26:0, from /usr/include/SDL/SDL.h:30, from SDL_ttf.c:46: /usr/include/SDL/SDL_stdinc.h:123:20: error: size of array 'SDL_dummy_enum' is negative typedef int SDL_dummy_ ## name[(x) * 2 - 1] ^ /usr/include/SDL/SDL_stdinc.h:151:1: note: in expansion of macro 'SDL_COMPILE_TIME_ASSERT' SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int)); ^~~~~~~~~~~~~~~~~~~~~~~ SDL_ttf.c: In function 'UTF8_to_UNICODE': SDL_ttf.c:943:11: warning: overflow in implicit constant conversion [-Woverflow] ch = (Uint16)(utf8[i]&0x07) << 18; ^ Makefile:545: fallo en las instrucciones para el objetivo 'SDL_ttf.lo' make[1]: *** [SDL_ttf.lo] Error 1 make[1]: se sale del directorio '/home/pedro4/Repositories/SDL-3DS/SDL_ttf-2.0.11' Makefile:92: fallo en las instrucciones para el objetivo 'SDL_ttf' make: *** [SDL_ttf] Error 2
Maybe there are some dependencies I'm not aware of that should be installed? I've only installed freetype2, but it might be necessary to install something else? I also installed this https://www.libsdl.org/release/SDL-devel-1.2.15-1.x86_64.rpmSDL_dummy_enum size check fails for the 3ds toolchain (and for many others too, like DS or PSVITA), but if the _3DS variable is defined in the makefile, that check should be skipped.
If you are correctly using my makefile, the SDL lib is compiled with the -D_3DS parameter and the same parameter is defined in the sdl-config file that the other SDL libs should recall.
Maybe the directory where the sdl-config file should be installed doesn'r exist and the makefile doesn't have permission to create it, or maybe it exist but doesn't have write permission. But the problem could be something else.
I know of othe people having the problem of the missing execution permission on the autogen.sh file, but fixed that everything worked fine, so I don't have other hints to give you.
Maybe there are some dependencies I'm not aware of that should be installed? I've only installed freetype2, but it might be necessary to install something else? I also installed this https://www.libsdl.org/release/SDL-devel-1.2.15-1.x86_64.rpm
As for sdl-config, I found it in SDL-3DS/SDL-1.2.15. I made sure I have 777ed that directory and also sdl-config, but still getting the same output.
the SDL devel x86 is the sdl lib for code running on your PC, my lib is for running code on the 3ds and your PC is used only to cross compile for the 3ds target system.
About the sdl-config file, you found the on generated at compile time, but the makefile try to copy it in the portlibs\3ds\bin folfer. Check if it's there.
If not, create the bin folder and set write permissions to it, than install again the sdl lib
Edit:you need also the sdl.pc file in portlibs\3ds\lib\pkgconfig
Well, make all doesn't even finish successfully but yeah, I tried to run make install after that despite the failure and I got the same error.After make all, are you running make install? It should copy every file in the right place.
I you don't solve I can provide you the compiled libs, but it's better if you find the problem and solve it, or you could find it again compiling your homebrews.
patching file configure.in
Reversed (or previously applied) patch detected! Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file configure.in.rej
patching file music_ogg.c
Reversed (or previously applied) patch detected! Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file music_ogg.c.rej
Makefile:108: fallo en las instrucciones para el objetivo 'SDL_mixer'
make: *** [SDL_mixer] Error 1
$(SDL_MIXER): $(SDL_MIXER_SRC)
@[ -d $(SDL_MIXER_VERSION) ] || tar --exclude=SDL_mixer-1.2.12/Xcode -xzf $<
@cd $(SDL_MIXER_VERSION) && \
patch -Np1 -i ../$(SDL_MIXER_VERSION).patch && \
./autogen.sh &&\
./configure --prefix=$(LIBS_PATH)/3ds --host=arm-none-eabi --disable-shared --enable-static \
--disable-music-cmd --enable-music-wave --enable-music-midi --enable-music-mod --enable-music-mp3-mad-gpl --enable-music-ogg --enable-music-ogg-tremor
@$(MAKE) -C $(SDL_MIXER_VERSION)
It's doing the patch so I suppose the error is right after it but I don't really know :\
I did that, I downloaded the project in a different folder and tried to run make again. I got a different error this time, but still related to SDL_mixer:If already patched the patch fails and make stops.
Clean the folder and run the makefile again (that will download a clean source).
/bin/bash ./libtool --mode=link arm-none-eabi-gcc -o build/playwave build/playwave.lo -D_GNU_SOURCE=1 -ffunction-sections -fdata-sections -march=armv6k -mtune=mpcore -mfloat-abi=hard -mword-relocations -DARM11 -D_3DS -I/opt/devkitpro/portlibs/3ds/include/SDL -I/opt/devkitpro/libctru/include -L/opt/devkitpro/portlibs/3ds/lib -L/opt/devkitpro/portlibs/3ds -L/opt/devkitpro/libctru/lib -specs=3dsx.specs -march=armv6k -mfloat-abi=hard -lSDL -lcitro3d -lctru build/libSDL_mixer.la
libtool: link: warning: library `/opt/devkitpro/portlibs/armv6k/lib/libmikmod.la' was moved.
libtool: link: warning: library `/opt/devkitpro/portlibs/armv6k/lib/libmikmod.la' was moved.
libtool: link: arm-none-eabi-gcc -o build/playwave build/playwave.o -D_GNU_SOURCE=1 -ffunction-sections -fdata-sections -march=armv6k -mtune=mpcore -mfloat-abi=hard -mword-relocations -DARM11 -D_3DS -I/opt/devkitpro/portlibs/3ds/include/SDL -I/opt/devkitpro/libctru/include -specs=3dsx.specs -march=armv6k -mfloat-abi=hard -L/opt/devkitpro/portlibs/3ds/lib -L/opt/devkitpro/portlibs/3ds -L/opt/devkitpro/libctru/lib -L/opt/devkitpro/portlibs/armv6k/lib build/.libs/libSDL_mixer.a /opt/devkitpro/portlibs/3ds/lib/libSDL.a -lcitro3d /opt/devkitpro/portlibs/armv6k/lib/libmikmod.a /opt/devkitpro/portlibs/armv6k/lib/libvorbisidec.a -lvorbis /opt/devkitpro/portlibs/armv6k/lib/libogg.a /opt/devkitpro/portlibs/armv6k/lib/libmad.a -lctru -lm
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/7.1.0/../../../../arm-none-eabi/bin/ld: cannot find -lvorbis
collect2: error: ld returned 1 exit status
Makefile:69: fallo en las instrucciones para el objetivo 'build/playwave'
make[1]: *** [build/playwave] Error 1
make[1]: se sale del directorio '/home/pedro4/Repositories/sdl_new/SDL_mixer-1.2.12'
Makefile:108: fallo en las instrucciones para el objetivo 'SDL_mixer'
make: *** [SDL_mixer] Error 2
I did that, I downloaded the project in a different folder and tried to run make again. I got a different error this time, but still related to SDL_mixer:
Code:/bin/bash ./libtool --mode=link arm-none-eabi-gcc -o build/playwave build/playwave.lo -D_GNU_SOURCE=1 -ffunction-sections -fdata-sections -march=armv6k -mtune=mpcore -mfloat-abi=hard -mword-relocations -DARM11 -D_3DS -I/opt/devkitpro/portlibs/3ds/include/SDL -I/opt/devkitpro/libctru/include -L/opt/devkitpro/portlibs/3ds/lib -L/opt/devkitpro/portlibs/3ds -L/opt/devkitpro/libctru/lib -specs=3dsx.specs -march=armv6k -mfloat-abi=hard -lSDL -lcitro3d -lctru build/libSDL_mixer.la libtool: link: warning: library `/opt/devkitpro/portlibs/armv6k/lib/libmikmod.la' was moved. libtool: link: warning: library `/opt/devkitpro/portlibs/armv6k/lib/libmikmod.la' was moved. libtool: link: arm-none-eabi-gcc -o build/playwave build/playwave.o -D_GNU_SOURCE=1 -ffunction-sections -fdata-sections -march=armv6k -mtune=mpcore -mfloat-abi=hard -mword-relocations -DARM11 -D_3DS -I/opt/devkitpro/portlibs/3ds/include/SDL -I/opt/devkitpro/libctru/include -specs=3dsx.specs -march=armv6k -mfloat-abi=hard -L/opt/devkitpro/portlibs/3ds/lib -L/opt/devkitpro/portlibs/3ds -L/opt/devkitpro/libctru/lib -L/opt/devkitpro/portlibs/armv6k/lib build/.libs/libSDL_mixer.a /opt/devkitpro/portlibs/3ds/lib/libSDL.a -lcitro3d /opt/devkitpro/portlibs/armv6k/lib/libmikmod.a /opt/devkitpro/portlibs/armv6k/lib/libvorbisidec.a -lvorbis /opt/devkitpro/portlibs/armv6k/lib/libogg.a /opt/devkitpro/portlibs/armv6k/lib/libmad.a -lctru -lm /opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/7.1.0/../../../../arm-none-eabi/bin/ld: cannot find -lvorbis collect2: error: ld returned 1 exit status Makefile:69: fallo en las instrucciones para el objetivo 'build/playwave' make[1]: *** [build/playwave] Error 1 make[1]: se sale del directorio '/home/pedro4/Repositories/sdl_new/SDL_mixer-1.2.12' Makefile:108: fallo en las instrucciones para el objetivo 'SDL_mixer' make: *** [SDL_mixer] Error 2
That worked! I removed -lvorbis and it worked. I also had to make some more changes to the Makefile cause it failed at some points but it's finally installed.Having different errors at every try is not a good thing, with patience you'll solve everything.
This problem reported by the compiler is that the vorbis lib is missing from your portlibs folder. The strange thing is that it shouldn't be needed since on 3ds is used libtremor.
This could be my mistake configuring the package (time ago I installed libborbis too, but I don't use it. This could be the reason I don't have any problem).
For a fast and dirty fix, edit the makefile in the SDL_mizer folder and remove -lvorbis flag, than run make from this folder (this should compile the SDL_Mixer lib if there aren't other problems).
Than you can compile the other libs one by one from the main folder running:
and finally run make install.
- make SDL_net
- make SDL_gfx
- make SDL_sound
When I have time I'll check the lib, but now I'm leaving for Japan and I'll back on 21 November, so this have to wait