ihaveamac / ninfs

FUSE filesystem Python scripts for Nintendo console files
MIT License
436 stars 18 forks source link

AUR fails to build due to missing include. #108

Closed J0w03L closed 6 months ago

J0w03L commented 6 months ago

When attempting to install ninfs from the AUR, the following error will be encountered:

ninfs/hac/_crypto.cpp:125:17: error: ‘string’ in namespace ‘std’ does not name a type
  125 |     static std::string GetPathByAddress(const void* addr) {
      |                 ^~~~~~
ninfs/hac/_crypto.cpp:28:1: note: ‘std::string’ is defined in header ‘<string>’; did you forget to ‘#include <string>’?
   27 | #include <dlfcn.h>
  +++ |+#include <string>
   28 | #define __ldl__ 1
ninfs/hac/_crypto.cpp: In function ‘void load_lcrypto()’:
ninfs/hac/_crypto.cpp:547:14: error: ‘string’ is not a member of ‘std’
  547 |         std::string *paths[2] = {nullptr, nullptr};
      |              ^~~~~~
ninfs/hac/_crypto.cpp:547:14: note: ‘std::string’ is defined in header ‘<string>’; did you forget to ‘#include <string>’?
ninfs/hac/_crypto.cpp:547:22: error: ‘paths’ was not declared in this scope
  547 |         std::string *paths[2] = {nullptr, nullptr};
      |                      ^~~~~
ninfs/hac/_crypto.cpp:548:14: error: ‘string’ is not a member of ‘std’
  548 |         std::string modulepath("");
      |              ^~~~~~
ninfs/hac/_crypto.cpp:548:14: note: ‘std::string’ is defined in header ‘<string>’; did you forget to ‘#include <string>’?
ninfs/hac/_crypto.cpp:550:13: error: ‘modulepath’ was not declared in this scope
  550 |             modulepath = DynamicHelper::GetPathByAddress((const void * )&load_lcrypto);
      |             ^~~~~~~~~~
ninfs/hac/_crypto.cpp:550:41: error: ‘GetPathByAddress’ is not a member of ‘DynamicHelper’
  550 |             modulepath = DynamicHelper::GetPathByAddress((const void * )&load_lcrypto);
      |                                         ^~~~~~~~~~~~~~~~
error: command '/usr/bin/gcc' failed with exit code 1
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'ninfs-1.6.1-1 (ninfs ninfs-gui)': 
error: packages failed to build: ninfs-1.6.1-1 (ninfs ninfs-gui)

Adding #include <string> to ninfs/hac/_crypto.cpp solved all of those for me; this should probably be added to the AUR version if not update the AUR version.

ihaveamac commented 6 months ago

This is most likely the result of the AUR version not being updated with the 2.0 "alpha" releases (1.6.1 is from May 2019). I thought I would get around to updating it for 2.0 eventually but that's taken me years...

Most likely what I will do is just drop the "alpha" tag so the last stable release isn't very old. Then that will give me an excuse to update the AUR.

ihaveamac commented 6 months ago

I made the 2.0 release and have fixed the PKGBUILD locally. But it is missing haccrypto now which is a separate dependency, so a new AUR package needs to be made for it.

ihaveamac commented 6 months ago

Wait it already is, somehow I missed it in my search... https://aur.archlinux.org/packages/python-haccrypto

ihaveamac commented 6 months ago

http://aur.archlinux.org/packages/ninfs http://aur.archlinux.org/packages/ninfs-git should work now

ihaveamac commented 6 months ago

This seems to be working now, tested on two arch machines. Please re-open if it’s still broken.