Homebrew Homebrew Development

  • Thread starter Thread starter aliak11
  • Start date Start date
  • Views Views 1,475,367
  • Replies Replies 6,048
  • Likes Likes 54
Hey can someone please help me out, I am trying to compile ninjhax2.x but i keep getting this error.
Code:
Makefile:6: *** "Please set CTRULIB in your environment. export DEVKITARM=<path to>ctrulib/libctru".  Stop.
Currently I am running Linux Mint17.1(ubuntu 14.04) i have devpro setup and its working(compiled reinand fine). I tried placing the ctrulib in the devpro directory and setting the path but it still wont work.
Anyone know how to fix this ?

If you want to do it the cheating way, edit the makefile and remove lines 5-7: https://github.com/smealum/ninjhax2.x/blob/master/Makefile#L5-L7

Otherwise, set/export the CTRULIB variable to just inside the ctrulib folder (so it'll see the include/lib folders). In my case it's something like C:\devkitPro\libctru\. In there is the include folder and the lib folder.
 
If you want to do it the cheating way, edit the makefile and remove lines 5-7: https://github.com/smealum/ninjhax2.x/blob/master/Makefile#L5-L7

Otherwise, set/export the CTRULIB variable to just inside the ctrulib folder (so it'll see the include/lib folders). In my case it's something like C:\devkitPro\libctru\. In there is the include folder and the lib folder.
Ok so i have libctru in my devkitpro folder I tried Exporting CTRULIB to it but same error, just a bit confused do i export CTRULIB or DEVKITARM since th error says to export that.

About the cheat way wont that break certain things??
 
Last edited by suhaib10,
As long as your ctrulib folder is indeed in the devkitPro folder, then it should be fine.

Well tried it by removing the requirement line in make got this:
Code:
make[1]: Entering directory `/home/suhaib10/Downloads/ninjhax2.x/firm_constants'
make[2]: Entering directory `/home/suhaib10'
make[2]: *** No targets specified and no makefile found.  Stop.
make[2]: Leaving directory `/home/suhaib10'
make[1]: *** [constants.txt] Error 2
make[1]: Leaving directory `/home/suhaib10/Downloads/ninjhax2.x/firm_constants'
make: *** [firm_constants/constants.txt] Error 2

P.S. Also when i try 'make clean' get a bunch of the same errors about CTRULIB, the checks are there in all make files in sub folders, so i guess ill try looking around to make ctrulib work. ALso could it be an issue with ctrulib 1.1.0 maybe i should try using an older version.
 
Last edited by suhaib10,
I am stuck at the very beginning of a project. I had high expectations for it, I wanted both images and text. I have installed freetype-2.5.4 on Mac, Windows, and Linux, linked -lfreetype, but when I compile I always get this result:

Code:
C:\mingw\msys\1.0\bin\make.exe -f Makefile
linking sf2d_sample.elf
c:/Users/michael.oriley/Desktop/ctrulib-master/sample/../libsftd/lib\libsftd.a(sftd.o): In function `ftc_face_requester':
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:44: undefined reference to `FT_New_Face'
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:50: undefined reference to `FT_New_Memory_Face'
c:/Users/michael.oriley/Desktop/ctrulib-master/sample/../libsftd/lib\libsftd.a(sftd.o): In function `sftd_init':
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:64: undefined reference to `FT_Init_FreeType'
c:/Users/michael.oriley/Desktop/ctrulib-master/sample/../libsftd/lib\libsftd.a(sftd.o): In function `sftd_fini':
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:77: undefined reference to `FT_Done_FreeType'
c:/Users/michael.oriley/Desktop/ctrulib-master/sample/../libsftd/lib\libsftd.a(sftd.o): In function `sftd_load_font_file':
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:100: undefined reference to `FTC_Manager_New'
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:115: undefined reference to `FTC_CMapCache_New'
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:116: undefined reference to `FTC_ImageCache_New'
c:/Users/michael.oriley/Desktop/ctrulib-master/sample/../libsftd/lib\libsftd.a(sftd.o): In function `sftd_load_font_mem':
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:136: undefined reference to `FTC_Manager_New'
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:150: undefined reference to `FTC_CMapCache_New'
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:151: undefined reference to `FTC_ImageCache_New'
c:/Users/michael.oriley/Desktop/ctrulib-master/sample/../libsftd/lib\libsftd.a(sftd.o): In function `sftd_free_font':
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:164: undefined reference to `FTC_Manager_RemoveFaceID'
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:165: undefined reference to `FTC_Manager_Done'
c:/Users/michael.oriley/Desktop/ctrulib-master/sample/../libsftd/lib\libsftd.a(sftd.o): In function `sftd_draw_text':
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:210: undefined reference to `FTC_Manager_LookupFace'
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:213: undefined reference to `FT_Get_Charmap_Index'
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:230: undefined reference to `FTC_CMapCache_Lookup'
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:239: undefined reference to `FTC_ImageCache_LookupScaler'
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:234: undefined reference to `FT_Get_Kerning'
c:/Users/michael.oriley/Desktop/ctrulib-master/sample/../libsftd/lib\libsftd.a(sftd.o): In function `sftd_draw_wtext':
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:287: undefined reference to `FTC_Manager_LookupFace'
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:290: undefined reference to `FT_Get_Charmap_Index'
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:307: undefined reference to `FTC_CMapCache_Lookup'
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:316: undefined reference to `FTC_ImageCache_LookupScaler'
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:311: undefined reference to `FT_Get_Kerning'
c:/Users/michael.oriley/Desktop/ctrulib-master/sample/../libsftd/lib\libsftd.a(sftd.o): In function `sftd_get_text_width':
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:364: undefined reference to `FTC_Manager_LookupFace'
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:367: undefined reference to `FT_Get_Charmap_Index'
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:384: undefined reference to `FTC_CMapCache_Lookup'
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:393: undefined reference to `FTC_ImageCache_LookupScaler'
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:388: undefined reference to `FT_Get_Kerning'
c:/Users/michael.oriley/Desktop/ctrulib-master/sample/../libsftd/lib\libsftd.a(sftd.o): In function `sftd_draw_text_wrap':
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:424: undefined reference to `FTC_Manager_LookupFace'
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:427: undefined reference to `FT_Get_Charmap_Index'
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:475: undefined reference to `FTC_ImageCache_LookupScaler'
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:463: undefined reference to `FTC_CMapCache_Lookup'
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:470: undefined reference to `FT_Get_Kerning'
c:/Users/michael.oriley/Desktop/ctrulib-master/sample/../libsftd/lib\libsftd.a(sftd.o): In function `sftd_calc_bounding_box':
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:517: undefined reference to `FTC_Manager_LookupFace'
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:520: undefined reference to `FT_Get_Charmap_Index'
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:572: undefined reference to `FTC_ImageCache_LookupScaler'
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:560: undefined reference to `FTC_CMapCache_Lookup'
c:/Users/michael.oriley/Desktop/ctrulib-master/libsftd/source/sftd.c:567: undefined reference to `FT_Get_Kerning'
collect2.exe: error: ld returned 1 exit status
make.exe[1]: *** [/c/Users/michael.oriley/Desktop/ctrulib-master/sample/sf2d_sample.elf] Error 1
make.exe": *** [build] Error 2

BUILD FAILED (exit value 2, total time: 3s)

It implies, from what I can gather on Google, that freetype is not being linked correctly. I have tried moving the link order around, downloading various libfreetype.a files from online, even compiled freetype on three different OSes as mentioned before... this is all I get. Has anyone run into a similar issue?
 
Ok I finally give up trying to fix this for myself. I've spent hours and I'm still stuck in the same place. Right now I'm trying to set up a development environment I'm trying to install the portlibs but I'm always getting this error trying to install zlib

Code:
arm-none-eabi-gcc -march=armv6k -mtune=mpcore -mfloat-abi=hard -O3 -mword-relocations  -DHAVE_HIDDEN -I/c/devkitPro/portlibs/armv6k/include  -c -o gzread.o gzread.c
arm-none-eabi-gcc -march=armv6k -mtune=mpcore -mfloat-abi=hard -O3 -mword-relocations  -DHAVE_HIDDEN -I/c/devkitPro/portlibs/armv6k/include  -c -o gzwrite.o gzwrite.c
arm-none-eabi-ar rc libz.a adler32.o crc32.o deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o
arm-none-eabi-gcc -march=armv6k -mtune=mpcore -mfloat-abi=hard -O3 -mword-relocations  -DHAVE_HIDDEN -o example example.o -L. libz.a
c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/5.3.0/../../../../arm-none-eabi/bin/ld.exe: warning: cannot find entry symbol _start; defaulting to 00008020
arm-none-eabi-gcc -march=armv6k -mtune=mpcore -mfloat-abi=hard -O3 -mword-relocations  -DHAVE_HIDDEN -I. -c -o minigzip.o test/minigzip.c
arm-none-eabi-gcc -march=armv6k -mtune=mpcore -mfloat-abi=hard -O3 -mword-relocations  -DHAVE_HIDDEN -o minigzip minigzip.o -L. libz.a
c:/devkitpro/devkitarm/bin/../lib/gcc/arm-none-eabi/5.3.0/../../../../arm-none-eabi/bin/ld.exe: warning: cannot find entry symbol _start; defaulting to 00008020
make[1]: Leaving directory `/c/devkitPro/portlibs/zlib-1.2.8'

This is getting really frustrating. I want to learn and figure out stuff by myself but I have no idea on what to do and maybe it's just something simple to fix. I only find troubleshooting about that error for other operating systems but I'm on windows 10. Any help will be greatly appreciated.
 
Last edited by JJTapia19,
Ok I finally give up trying to fix this for myself. I've spent hours and I'm still stuck in the same place. Right now I'm trying to set up a development environment I'm trying to install the portlibs but I'm always getting this error trying to install zlib

I would suggest to use the precompiled version of the portlibs, they are available here: https://github.com/xerpi/3ds_portlibs/releases

If you are on Windows just grab the correct file and unzip it as is in C:\devkitpro

Once you've placed the files in the folder you can just compile sftd with make and then make install
 
Last edited by Slashcash,
I would suggest to use the precompiled version of the portlibs, they are available here: https://github.com/xerpi/3ds_portlibs/releases

If you are on Windows just grab the correct file and unzip it as is in C:\devkitpro

Once you've placed the files in the folder you can just compile sftd with make and then make install
That worked perfectly. I compiled the original homebrew launcher to test. Thanks a lot for helping me! I had no idea a precompiled version was available. :yay:
 
I would suggest to use the precompiled version of the portlibs, they are available here: https://github.com/xerpi/3ds_portlibs/releases

If you are on Windows just grab the correct file and unzip it as is in C:\devkitpro

Once you've placed the files in the folder you can just compile sftd with make and then make install

build successful... i haven't seen those words in THREE DAYS. thank you! and good luck with your project, let me know if you need an API if you decide to take it online.
 
build successful... i haven't seen those words in THREE DAYS. thank you! and good luck with your project, let me know if you need an API if you decide to take it online.

The plan is to take it online as soon as i finish adding those two or three features missing! I will surely ask for help.
 
Just a quick question; what's the difference between a system applet and a library applet?

System applets are things like the friends list, the internet browser, and notes. Library applets are things like the parental controls PIN keypad, and the software keyboard that you typically get when entering names in games, or URLs in the browser.
 
  • Like
Reactions: Deleted User
System applets are things like the friends list, the internet browser, and notes. Library applets are things like the parental controls PIN keypad, and the software keyboard that you typically get when entering names in games, or URLs in the browser.
Thanks. I'm now trying to see if I can get the software keyboard to function (obviously in a CIA build). I noticed stuff here, which is giving me a rough time again:
Code:
/**
 * @brief Prepares to start a library applet.
 * @param appID ID of the applet to start.
 */
Result APT_PrepareToStartLibraryApplet(NS_APPID appID);

/**
 * @brief Starts a library applet.
 * @param appID ID of the applet to launch.
 * @param inhandle Handle to pass to the applet.
 * @param parambuf Buffer containing applet parameters.
 * @param parambufsize Size of parambuf.
 */
Result APT_StartLibraryApplet(NS_APPID appID, Handle inhandle, u32 *parambuf, u32 parambufsize);

/**
 * @brief Launches a library applet.
 * Note: This is not usable from the homebrew launcher. This is broken: when the applet does get launched at all, the applet process doesn't actually get terminated when the applet gets closed.
 * @param appID ID of the applet to launch.
 * @param inhandle Handle to pass to the applet.
 * @param parambuf Buffer containing applet parameters.
 * @param parambufsize Size of parambuf.
 */
Result APT_LaunchLibraryApplet(NS_APPID appID, Handle inhandle, u32 *parambuf, u32 parambufsize);
 
Thanks. I'm now trying to see if I can get the software keyboard to function (obviously in a CIA build). I noticed stuff here, which is giving me a rough time again:

I don't think you'll be able to; the software keyboard requires a huge block of data that nobody's seemed to reverse engineer yet. That, and I think the comment is still true about it being broken when launching library applets (even from CIAs).
 
That, and I think the comment is still true about it being broken when launching library applets (even from CIAs).
I thought that disclaimer only applied to homebrew builds though. :blink:

anyhow, it looks as if I'm having to make my own keyboard layout, if that's the case.

--------------------- MERGED ---------------------------

Also, what's this?
Code:
APPID_SOFTWARE_KEYBOARD = 0x401
I saw this in a typedef enum.
 
I thought that disclaimer only applied to homebrew builds though. :blink:

anyhow, it looks as if I'm having to make my own keyboard layout, if that's the case.

I'm fairly sure it applies to both CIA and 3dsx; they've not really put a lot of priority into fixing it as far as I know. There are several homebrew keyboard libraries out there, so it shouldn't be too hard to find one that you might like.

Also, what's this?
Code:
APPID_SOFTWARE_KEYBOARD = 0x401
I saw this in a typedef enum.

That's just the ID number if you will, of the keyboard, so that the 3DS knows which applet to run.
 
Thanks. If I could somehow manage to build the 3DS SDK samples using the omake build system, then I could be able to use the software keyboard from there, since Nintendo made a keyboard example!
 
Last edited by ,
Thanks. If I could somehow manage to build the 3DS SDK samples using the omake build system, then I could be able to use the software keyboard from there, since Nintendo made a keyboard example!

Probably, but you wouldn't be allowed to share binary versions of the homebrew here, for obvious reasons (source code would probably be questionable too..).
 
  • Like
Reactions: Deleted User
Probably, but you wouldn't be allowed to share binary versions of the homebrew here, for obvious reasons (source code would probably be questionable too..).
Ah yes, never thought of that. :P

--------------------- MERGED ---------------------------

If that's the case then, can I ask what's a good keyboard example to use?
 
  • Like
Reactions: daxtsu
  • Like
Reactions: Deleted User

Site & Scene News

Popular threads in this forum