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

OpenBSD Fails to build D++ due to broken <locale> system header #765

Closed
mrtuxa opened this issue Aug 9, 2023 · 9 comments · Fixed by #880
Closed

OpenBSD Fails to build D++ due to broken <locale> system header #765

mrtuxa opened this issue Aug 9, 2023 · 9 comments · Fixed by #880
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@mrtuxa
Copy link
Contributor

mrtuxa commented Aug 9, 2023

i cant compile DPP

i get this error

In file included from /home/mrtuxa/pkgs/DPP/src/dpp/discordevents.cpp:25:
In file included from /usr/include/c++/v1/iostream:38:
In file included from /usr/include/c++/v1/istream:163:
In file included from /usr/include/c++/v1/ostream:140:
In file included from /usr/include/c++/v1/locale:218:
/usr/include/c++/v1/__bsd_locale_fallbacks.h:122:17: error: use of undeclared identifier 'vasprintf'; did you mean 'vsprintf'?
    int __res = vasprintf(__s, __format, __va);
                ^
/usr/include/c++/v1/cstdio:124:9: note: 'vsprintf' declared here
using ::vsprintf _LIBCPP_USING_IF_EXISTS;
        ^
In file included from /home/mrtuxa/pkgs/DPP/src/dpp/discordevents.cpp:25:
In file included from /usr/include/c++/v1/iostream:38:
In file included from /usr/include/c++/v1/istream:163:
In file included from /usr/include/c++/v1/ostream:140:
In file included from /usr/include/c++/v1/locale:218:
/usr/include/c++/v1/__bsd_locale_fallbacks.h:122:27: error: cannot initialize a parameter of type 'char *' with an lvalue of type 'char **'
    int __res = vasprintf(__s, __format, __va);
                          ^~~
/usr/include/stdio.h:269:21: note: passing argument to parameter here
int      vsprintf(char *, const char *, __va_list);
                        ^
[ 71%] Building CXX object library/CMakeFiles/dpp.dir/__/src/dpp/discordclient.cpp.o
2 errors generated.
*** Error 1 in target 'library/CMakeFiles/dpp.dir/__/src/dpp/discordevents.cpp.o'
*** Error 1 in . (library/CMakeFiles/dpp.dir/build.make:538 'library/CMakeFiles/dpp.dir/__/src/dpp/discordevents.cpp.o': cd /home/mrtuxa/pkg...)
*** Error 2 in . (CMakeFiles/Makefile2:102 'library/CMakeFiles/dpp.dir/all')
*** Error 2 in /home/mrtuxa/pkgs/DPP/build (Makefile:156 'all': /usr/bin/make -s -f CMakeFiles/Makefile2 all)
@mrtuxa mrtuxa added the bug Something isn't working label Aug 9, 2023
@mrtuxa
Copy link
Contributor Author

mrtuxa commented Aug 9, 2023

the package names of the dependencies are the same as in FreeBSD btw

@braindigitalis
Copy link
Contributor

this error is not in dpp, it looks like your standard libraries are broken?

@braindigitalis
Copy link
Contributor

this is a bug in the headers in openbsd and not something we can fix as far as I can tell. have you tried updating openbsd?

The issue has been around for many years and affects many projects. C++ just doesn't seem well tested there.

if you do find a workaround that doesn't break other systems a PR would be welcomed. I don't have access to an openbsd system to test this.

@braindigitalis braindigitalis changed the title OpenBSD Support OpenBSD Fails to build D++ due to broken<locale> system header Aug 9, 2023
@braindigitalis braindigitalis changed the title OpenBSD Fails to build D++ due to broken<locale> system header OpenBSD Fails to build D++ due to broken <locale> system header Aug 9, 2023
@braindigitalis braindigitalis removed their assignment Aug 9, 2023
@braindigitalis braindigitalis added the help wanted Extra attention is needed label Aug 9, 2023
@mrtuxa
Copy link
Contributor Author

mrtuxa commented Aug 9, 2023

i updated my system but still the same error

@Jaskowicz1
Copy link
Contributor

I'm now investigating this.

@Jaskowicz1
Copy link
Contributor

This issue still persists as of the latest version of OpenBSD (install73.iso, amd64).

@Jaskowicz1
Copy link
Contributor

I've got a fix, i'm testing it and ensuring that everything works. Will launch a PR soon.

@Jaskowicz1
Copy link
Contributor

I've launched a PR to fix this #880 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants