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

error: use of undeclared identifier 'hint'; did you mean 'link'? #722

Open
ehaupt opened this issue Apr 7, 2023 · 4 comments
Open

error: use of undeclared identifier 'hint'; did you mean 'link'? #722

ehaupt opened this issue Apr 7, 2023 · 4 comments

Comments

@ehaupt
Copy link

ehaupt commented Apr 7, 2023

When trying to compile 2.1.1 on FreeBSD I get:

/usr/local/libexec/ccache/cc -DMI_MALLOC_OVERRIDE -DMI_SHARED_LIB -DMI_SHARED_LIB_EXPORT -Dmimalloc_EXPORTS -I/wrkdirs/usr/ports/devel/mimalloc/work/mimalloc-2.1.1/include -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -DNDEBUG -fPIC -Wall -Wextra -Wno-unknown-pragmas -fvisibility=hidden -Wstrict-prototypes -Wpedantic -Wno-static-in-inline -ftls-model=initial-exec -fno-builtin-malloc -std=gnu11 -MD -MT CMakeFiles/mimalloc.dir/src/prim/prim.c.o -MF CMakeFiles/mimalloc.dir/src/prim/prim.c.o.d -o CMakeFiles/mimalloc.dir/src/prim/prim.c.o -c /wrkdirs/usr/ports/devel/mimalloc/work/mimalloc-2.1.1/src/prim/prim.c
In file included from /wrkdirs/usr/ports/devel/mimalloc/work/mimalloc-2.1.1/src/prim/prim.c:22:
/wrkdirs/usr/ports/devel/mimalloc/work/mimalloc-2.1.1/src/prim/unix/prim.c:172:184: error: use of undeclared identifier 'hint'; did you mean 'link'?
        _mi_warning_message("unable to directly request aligned OS memory (error: %d (0x%x), size: 0x%zx bytes, alignment: 0x%zx, hint address: %p)\n", err, err, size, try_alignment, hint);
                                                                                                                                                                                       ^~~~
                                                                                                                                                                                       link
/usr/include/unistd.h:351:6: note: 'link' declared here
int      link(const char *, const char *);
         ^
1 error generated.

The full build log:
mimalloc-2.1.1.log

Environment:

FreeBSD 13.1-RELEASE amd64
clang 14.0.5
devnexen added a commit to devnexen/mimalloc that referenced this issue Apr 7, 2023
@devnexen
Copy link
Contributor

devnexen commented Apr 7, 2023

thanks for the report, long time I did not build on freebsd, it got unnoticed for a while.

@ehaupt
Copy link
Author

ehaupt commented Apr 7, 2023

thanks for the report, long time I did not build on freebsd, it got unnoticed for a while.

Thank you for the quick fix. I've just updated the FreeBSD port.

freebsd-git pushed a commit to freebsd/freebsd-ports that referenced this issue Apr 7, 2023
@ehaupt ehaupt closed this as completed Apr 7, 2023
@yonas
Copy link

yonas commented Jun 16, 2023

@ehaupt Can you re-open this so we can commit the patch upstream? Thanks.

@ehaupt ehaupt reopened this Jun 18, 2023
@ehaupt
Copy link
Author

ehaupt commented Jun 18, 2023

@yonas, done. Not sure why I closed it.

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

3 participants