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

configure fails to find scotch because of: error: unknown type name 'int64_t' #296

Open
yurivict opened this issue Dec 4, 2023 · 4 comments

Comments

@yurivict
Copy link

yurivict commented Dec 4, 2023

Failure log:

configure:20468: checking check scotch
configure:20491: c++ -o conftest  -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -DNDEBUG -O3 -std=gnu++14 -DBAMG_LONG_LONG  -DNCHECKPTR -fPIC -I/usr/local/include/superlu -isystem /usr/local/include  -s -L/usr/local/lib -Wl,-rpath=/usr/local/lib/gcc12  -L/usr/local/lib/gcc12 -fstack-protector-strong  -rdynamic conftest.cpp -ldl -lm -lrt -lz  -L/usr/local/lib -L/usr/local/lib/gcc12 -L/usr/local/lib/gcc12/gcc/x86_64-portbld-freebsd13.2/12.2.0 -L/usr/local/lib/gcc12/gcc/x86_64-portbld-freebsd13.2/12.2.0/../../../../../x86_64-portbld-freebsd13.2/lib -L/usr/local/lib/gcc12/gcc/x86_64-portbld-freebsd13.2/12.2.0/../../.. -lz -lgfortran -lm -lssp_nonshared -lquadmath -lscotch -lscotcherr  >&5
In file included from conftest.cpp:60:
/usr/local/include/scotch.h:76:9: error: unknown type name 'int64_t'
typedef int64_t SCOTCH_Idx;
        ^
/usr/local/include/scotch.h:78:9: error: unknown type name 'int64_t'
typedef int64_t SCOTCH_Num;
        ^

Did you forget to #include <sys/types.h> ?

Version: 4.14
FreeBSD 13.2

@prj-
Copy link
Member

prj- commented Dec 4, 2023

If you use PETSc with SCOTCH, you will not have this issue.

@yurivict
Copy link
Author

yurivict commented Dec 4, 2023

This is a bug in scotch: https://gitlab.inria.fr/scotch/scotch/-/issues/35

@yurivict
Copy link
Author

yurivict commented Dec 4, 2023

Additionally, you also need to use -pthread to link the test executable during configure:

configure:20468: checking check scotch
configure:20491: c++ -o conftest  -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -DNDEBUG -O3 -std=gnu++14 -DBAMG_LONG_LONG  -DNCHECKPTR -fPIC -I/usr/local/include/superlu -isystem /usr/local/include  -s -L/usr/local/lib -Wl,-rpath=/usr/local/lib/gcc12  -L/usr/local/lib/gcc12 -fstack-protector-strong  -rdynamic conftest.cpp -ldl -lm -lrt -lz  -L/usr/local/lib -L/usr/local/lib/gcc12 -L/usr/local/lib/gcc12/gcc/x86_64-portbld-freebsd13.2/12.2.0 -L/usr/local/lib/gcc12/gcc/x86_64-portbld-freebsd13.2/12.2.0/../../../../../x86_64-portbld-freebsd13.2/lib -L/usr/local/lib/gcc12/gcc/x86_64-portbld-freebsd13.2/12.2.0/../../.. -lz -lgfortran -lm -lssp_nonshared -lquadmath -lscotch -lscotcherr  >&5
ld: error: undefined reference due to --no-allow-shlib-undefined: pthread_barrier_wait
>>> referenced by /usr/local/lib/libscotch.so 

ld: error: undefined reference due to --no-allow-shlib-undefined: pthread_barrier_init
>>> referenced by /usr/local/lib/libscotch.so

ld: error: undefined reference due to --no-allow-shlib-undefined: pthread_barrier_destroy
>>> referenced by /usr/local/lib/libscotch.so
c++: error: linker command failed with exit code 1 (use -v to see invocation)

@prj-
Copy link
Member

prj- commented Dec 4, 2023

My point still stands, if you use PETSc with SCOTCH, you will not have any of these issues.

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