Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AUR fails to build due to missing include. #108

Closed
J0w03L opened this issue Feb 24, 2024 · 5 comments
Closed

AUR fails to build due to missing include. #108

J0w03L opened this issue Feb 24, 2024 · 5 comments

Comments

@J0w03L
Copy link

J0w03L commented Feb 24, 2024

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
Copy link
Owner

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
Copy link
Owner

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
Copy link
Owner

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

@ihaveamac
Copy link
Owner

@ihaveamac
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants