XorTroll / Goldleaf

🍂 Multipurpose homebrew tool for Nintendo Switch
GNU General Public License v3.0
2.58k stars 349 forks source link

building error #662

Closed Retropex closed 1 year ago

Retropex commented 1 year ago

Hello, I'm trying to build Goldleaf so that it can work with the latest version of HOS but I get the following error could you help me?

make[1]: Entering directory '/home/parallels/Goldleaf/libnx'
make -C nx/
make[2]: Entering directory '/home/parallels/Goldleaf/libnx/nx'
make[3]: '/home/parallels/Goldleaf/libnx/nx/lib/libnx.a' is up to date.
make[3]: '/home/parallels/Goldleaf/libnx/nx/lib/libnxd.a' is up to date.
make[2]: Leaving directory '/home/parallels/Goldleaf/libnx/nx'
make[1]: Leaving directory '/home/parallels/Goldleaf/libnx'
make[1]: Entering directory '/home/parallels/Goldleaf/Plutonium'
make[2]: Entering directory '/home/parallels/Goldleaf/Plutonium/Plutonium'
make[3]: '/home/parallels/Goldleaf/Plutonium/Plutonium/lib/libpu.a' is up to date.
make[2]: Leaving directory '/home/parallels/Goldleaf/Plutonium/Plutonium'
make[1]: Leaving directory '/home/parallels/Goldleaf/Plutonium'
make[1]: Entering directory '/home/parallels/Goldleaf/Goldleaf'
linking Goldleaf.elf
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/12.2.0/../../../../aarch64-none-elf/bin/ld: cannot find -lcurl
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/12.2.0/../../../../aarch64-none-elf/bin/ld: cannot find -lmbedtls
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/12.2.0/../../../../aarch64-none-elf/bin/ld: cannot find -lmbedcrypto
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/12.2.0/../../../../aarch64-none-elf/bin/ld: cannot find -lmbedx509
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/12.2.0/../../../../aarch64-none-elf/bin/ld: cannot find -lusbhsfs
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/12.2.0/../../../../aarch64-none-elf/bin/ld: cannot find -lntfs-3g
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/12.2.0/../../../../aarch64-none-elf/bin/ld: cannot find -llwext4
collect2: error: ld returned 1 exit status
make[2]: *** [/opt/devkitpro/libnx/switch_rules:80: /home/parallels/Goldleaf/Goldleaf/Goldleaf.elf] Error 1
make[1]: *** [Makefile:176: build] Error 2
make[1]: Leaving directory '/home/parallels/Goldleaf/Goldleaf'
make: *** [Makefile:8: all] Error 2
XorTroll commented 1 year ago

Run make initial if this is your first time compiling it

Retropex commented 1 year ago

Unfortunately this command also gives me an error

make[1]: Entering directory '/home/parallels/Goldleaf/libnx'
make -C nx/
make[2]: Entering directory '/home/parallels/Goldleaf/libnx/nx'
make[3]: '/home/parallels/Goldleaf/libnx/nx/lib/libnx.a' is up to date.
make[3]: '/home/parallels/Goldleaf/libnx/nx/lib/libnxd.a' is up to date.
make[2]: Leaving directory '/home/parallels/Goldleaf/libnx/nx'
make[1]: Leaving directory '/home/parallels/Goldleaf/libnx'
make[1]: Entering directory '/home/parallels/Goldleaf/Plutonium'
make[2]: Entering directory '/home/parallels/Goldleaf/Plutonium/Plutonium'
make[3]: '/home/parallels/Goldleaf/Plutonium/Plutonium/lib/libpu.a' is up to date.
make[2]: Leaving directory '/home/parallels/Goldleaf/Plutonium/Plutonium'
make[1]: Leaving directory '/home/parallels/Goldleaf/Plutonium'
make[1]: Entering directory '/home/parallels/Goldleaf/libusbhsfs'
Installing ntfs-3g
make[2]: Entering directory '/home/parallels/Goldleaf/libusbhsfs/libntfs-3g'
    ntfs-3g_ntfsprogs-2017.3.23.tgz ... Passed
    switch-libntfs-3g-2017.3.23.patch ... Passed
configure: WARNING: using cross tools not prefixed with host triplet
/usr/bin/rm: cannot remove 'libtoolT': No such file or directory
collate.c: In function 'ntfs_collate_file_name':
collate.c:230:36: warning: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Waddress-of-packed-member]
  230 |                         (ntfschar*)&file_name_attr1->file_name,
      |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
collate.c:232:36: warning: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Waddress-of-packed-member]
  232 |                         (ntfschar*)&file_name_attr2->file_name,
      |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
dir.c: In function 'ntfs_inode_lookup_by_name':
dir.c:343:44: warning: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Waddress-of-packed-member]
  343 |                                 (ntfschar*)&ie->key.file_name.file_name,
      |                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
dir.c:483:44: warning: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Waddress-of-packed-member]
  483 |                                 (ntfschar*)&ie->key.file_name.file_name,
      |                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
dir.c: In function 'ntfs_filldir':
dir.c:1029:49: warning: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Waddress-of-packed-member]
 1029 |                         res = filldir(dirent, fn->file_name,
      |                                               ~~^~~~~~~~~~~
dir.c: In function 'ntfs_delete':
dir.c:1960:44: warning: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Waddress-of-packed-member]
 1960 |                 if (ntfs_names_are_equal(fn->file_name, fn->file_name_length,
      |                                          ~~^~~~~~~~~~~
ea.c: In function 'ntfs_set_ntfs_ea':
ea.c:270:43: warning: array subscript 255 is outside the bounds of an interior zero-length array 'const u8[0]' {aka 'const unsigned char[]'} [-Wzero-length-bounds]
  270 |                             && !p_ea->name[p_ea->name_length];
      |                                 ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
In file included from ea.c:49:
../include/ntfs-3g/layout.h:2475:12: note: while referencing 'name'
 2475 |         u8 name[0];             /* Name of the EA. */
      |            ^~~~
index.c: In function 'ntfs_ie_filename_get':
index.c:277:37: warning: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Waddress-of-packed-member]
  277 |         return ntfs_attr_name_get(fn->file_name, fn->file_name_length);
      |                                   ~~^~~~~~~~~~~
inode.c: In function 'ntfs_inode_add_attrlist':
inode.c:1256:61: warning: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Waddress-of-packed-member]
 1256 |                         if (!ntfs_attr_lookup(ale->type, ale->name,
      |                                                          ~~~^~~~~~
inode.c:1155:60: warning: pointer 'al' may be used after 'realloc' [-Wuse-after-free]
 1155 |                 ale = (ATTR_LIST_ENTRY *)(aln + ((u8 *)ale - al));
      |                                                 ~~~~~~~~~~~^~~~~
inode.c:1149:23: note: call to 'realloc' here
 1149 |                 aln = realloc(al, al_len);
      |                       ^~~~~~~~~~~~~~~~~~~
ioctl.c: In function 'ntfs_ioctl':
ioctl.c:383:2: warning: #warning Trimming not supported : FITRIM or BLKDISCARD not defined [-Wcpp]
  383 | #warning Trimming not supported : FITRIM or BLKDISCARD not defined
      |  ^~~~~~~
reparse.c: In function 'ntfs_fix_file_name':
reparse.c:176:61: warning: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Waddress-of-packed-member]
  176 |                            && ntfs_names_are_equal(find.attr.file_name,
      |                                                    ~~~~~~~~~^~~~~~~~~~
reparse.c:178:38: warning: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Waddress-of-packed-member]
  178 |                                 found->file_name, found->file_name_length,
      |                                 ~~~~~^~~~~~~~~~~
reparse.c:156:52: warning: array subscript 254 is outside the bounds of an interior zero-length array 'ntfschar[0]' {aka 'short unsigned int[]'} [-Wzero-length-bounds]
  156 |                                 find.attr.file_name[i] = vol->upcase[cpuchar];
      |                                 ~~~~~~~~~~~~~~~~~~~^~~
In file included from reparse.c:47:
../include/ntfs-3g/layout.h:1139:18: note: while referencing 'file_name'
 1139 | /* 42*/ ntfschar file_name[0];                  /* File name in Unicode. */
      |                  ^~~~~~~~~
reparse.c:158:52: warning: array subscript 254 is outside the bounds of an interior zero-length array 'ntfschar[0]' {aka 'short unsigned int[]'} [-Wzero-length-bounds]
  158 |                                 find.attr.file_name[i] = uname[i];
      |                                 ~~~~~~~~~~~~~~~~~~~^~~
../include/ntfs-3g/layout.h:1139:18: note: while referencing 'file_name'
 1139 | /* 42*/ ntfschar file_name[0];                  /* File name in Unicode. */
      |                  ^~~~~~~~~
security.c: In function 'ntfs_security_hash':
security.c:397:9: warning: converting a packed 'SECURITY_DESCRIPTOR_RELATIVE' pointer (alignment 1) to a 'le32' {aka 'const unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member]
  397 |         const le32 *pos = (const le32*)sd;
      |         ^~~~~
security.c: In function 'entersecurityattr':
security.c:698:48: warning: converting a packed 'INDEX_ENTRY' pointer (alignment 1) to a 'struct SII' pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member]
  698 |                                 psii = (struct SII*)next;
      |                                                ^~~
In file included from security.c:55:
../include/ntfs-3g/layout.h:2304:9: note: defined here
 2304 | typedef struct {
      |         ^~~~~~
security.c:85:8: note: defined here
   85 | struct SII {            /* this is an image of an $SII index entry */
      |        ^~~
security.c:722:56: warning: converting a packed 'INDEX_ENTRY' pointer (alignment 1) to a 'struct SII' pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member]
  722 |                                         psii = (struct SII*)entry;
      |                                                        ^~~
../include/ntfs-3g/layout.h:2304:9: note: defined here
 2304 | typedef struct {
      |         ^~~~~~
security.c:85:8: note: defined here
   85 | struct SII {            /* this is an image of an $SII index entry */
      |        ^~~
security.c: In function 'setsecurityattr':
security.c:877:48: warning: converting a packed 'INDEX_ENTRY' pointer (alignment 1) to a 'struct SDH' pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member]
  877 |                                 psdh = (struct SDH*)entry;
      |                                                ^~~
../include/ntfs-3g/layout.h:2304:9: note: defined here
 2304 | typedef struct {
      |         ^~~~~~
security.c:103:8: note: defined here
  103 | struct SDH {            /* this is an image of an $SDH index entry */
      |        ^~~
unistr.c: In function 'ntfs_file_value_upcase':
unistr.c:432:37: warning: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Waddress-of-packed-member]
  432 |         ntfs_name_upcase((ntfschar*)&file_name_attr->file_name,
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
libtool: install: warning: remember to run `libtool --finish /opt/devkitpro/portlibs/switch/lib'
warning: switch-libntfs-3g-2017.3.23-3 is up to date -- reinstalling
make[2]: Leaving directory '/home/parallels/Goldleaf/libusbhsfs/libntfs-3g'
Installing lwext4
make[2]: Entering directory '/home/parallels/Goldleaf/libusbhsfs/liblwext4'
    733b2c40d7121900e339bee8784977467a9fe8c9.zip ... Passed
    switch-lwext4-733b2c40d7121900e339bee8784977467a9fe8c9.patch ... Passed
/opt/devkitpro/portlibs/switch/bin/aarch64-none-elf-cmake: line 4: exec: cmake: not found
make[3]: *** [Makefile:68: lib_only] Error 127
==> ERROR: A failure occurred in prepare().
    Aborting...
make[2]: *** [Makefile:13: all] Error 4
make[2]: Leaving directory '/home/parallels/Goldleaf/libusbhsfs/liblwext4'
make[1]: *** [Makefile:147: fs-libs] Error 2
make[1]: Leaving directory '/home/parallels/Goldleaf/libusbhsfs'
make: *** [Makefile:13: initial] Error 2
Masamune3210 commented 1 year ago

you are missing the correct version of cmake or your environment is not set up correctly

Retropex commented 1 year ago

Ok it fixed the errors I had but I still can't finish the compilation I have permissions errors and I can't run make with sudo:

make[3]: Nothing to be done for 'all'.
tar: include/usbhsfs.h: Cannot open: Permission denied
tar: include: Cannot utime: Operation not permitted
tar: include: Cannot change mode to rwxrwxr-x: Operation not permitted
tar: lib/libusbhsfs.a: Cannot open: Permission denied
tar: lib/libusbhsfsd.a: Cannot open: Permission denied
tar: lib: Cannot utime: Operation not permitted
tar: lib: Cannot change mode to rwxrwxr-x: Operation not permitted
tar: Exiting with failure status due to previous errors
make[1]: *** [Makefile:185: install] Error 2
make[1]: Leaving directory '/home/parallels/Goldleaf/libusbhsfs'
make: *** [Makefile:13: initial] Error 2