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

linux build error: ld cannot find -lpthread and -lc #9

Open
juhp opened this issue Jan 7, 2020 · 0 comments
Open

linux build error: ld cannot find -lpthread and -lc #9

juhp opened this issue Jan 7, 2020 · 0 comments

Comments

@juhp
Copy link

juhp commented Jan 7, 2020

I tried building with ats-pkg on Fedora 31:

$ atspkg build --pkg-args './gc.dhall'
# pandoc (for man/poly.1)
Resolving dependencies...
Fetching stack...
Fetching concurrency...
Fetching edit-distance...
Fetching specats...
Fetching ats-bench...
Unpacking ats-bench...
Unpacking concurrency...
Unpacking specats...
Unpacking stack...
Unpacking edit-distance...
Building C dependencies...
# patsopt (for .atspkg/c/src/polyglot.c)
# gcc (for target/poly)
atspkg: Error when running Shake build system:
  at want, called at src/Language/ATS/Package/Build.hs:255:21 in ats-pkg-3.4.0.8-2ccd836ab739b6e2354fcd48211d6fb91ccf31d2e166ac71eed11909f32e7836:Language.ATS.Package.Build
* Depends on: target/poly
  at command, called at src/Development/Shake/C.hs:204:6 in shake-c-0.4.3.0-8e5a0098f011a4833609922116384224c45ddcb48eff0c45d1458eb3e81b1079:Development.Shake.C
* Raised the exception:
Development.Shake.command, system command failed
Command line: gcc -o target/poly .atspkg/c/src/polyglot.c -I/var/home/petersen/.atspkg/0.3.13/lib/ats2-postiats-0.3.13/ccomp/runtime -I/var/home/petersen/.atspkg/0.3.13/lib/ats2-postiats-0.3.13 -I/var/home/petersen/.atspkg/include -I.atspkg/contrib -latslib -lgc -lpthread -L/var/home/petersen/.atspkg/lib -L/var/home/petersen/.atspkg/0.3.13/lib/ats2-postiats-0.3.13/ccomp/atslib/lib -DATS_MEMALLOC_GCBDW -I include -I . -flto -O2 -static
Exit code: 1
Stderr:
.atspkg/c/src/polyglot.c: In function ‘__patsfun_1861__1861__1’:
.atspkg/c/src/polyglot.c:170253:1: warning: ‘readdir_r’ is deprecated [-Wdeprecated-declarations]
170253 | ATSINSmove(tmp8022__1, atslib_libats_libc_readdir_r(ATSPMVrefarg0(env0), ATSPMVrefarg1(ATSPMVptrof(ATSSELcon(tmp8020__1, postiats_tysum_18, atslab__0))), ATSPMVrefarg1(ATSPMVptrof(tmpref8021__1)))) ;
       | ^~~~~~~~~~
In file included from /var/home/petersen/.atspkg/0.3.13/lib/ats2-postiats-0.3.13/libats/libc/CATS/dirent.cats:44,
                 from .atspkg/c/src/polyglot.c:267:
/usr/include/dirent.h:183:12: note: declared here
  183 | extern int readdir_r (DIR *__restrict __dirp,
      |            ^~~~~~~~~
.atspkg/c/src/polyglot.c: In function ‘__patsfun_1861__1861__2’:
.atspkg/c/src/polyglot.c:173971:1: warning: ‘readdir_r’ is deprecated [-Wdeprecated-declarations]
173971 | ATSINSmove(tmp8022__2, atslib_libats_libc_readdir_r(ATSPMVrefarg0(env0), ATSPMVrefarg1(ATSPMVptrof(ATSSELcon(tmp8020__2, postiats_tysum_18, atslab__0))), ATSPMVrefarg1(ATSPMVptrof(tmpref8021__2)))) ;
       | ^~~~~~~~~~
In file included from /var/home/petersen/.atspkg/0.3.13/lib/ats2-postiats-0.3.13/libats/libc/CATS/dirent.cats:44,
                 from .atspkg/c/src/polyglot.c:267:
/usr/include/dirent.h:183:12: note: declared here
  183 | extern int readdir_r (DIR *__restrict __dirp,
      |            ^~~~~~~~~
.atspkg/c/src/polyglot.c: In function ‘__patsfun_1861__1861__3’:
.atspkg/c/src/polyglot.c:176913:1: warning: ‘readdir_r’ is deprecated [-Wdeprecated-declarations]
176913 | ATSINSmove(tmp8022__3, atslib_libats_libc_readdir_r(ATSPMVrefarg0(env0), ATSPMVrefarg1(ATSPMVptrof(ATSSELcon(tmp8020__3, postiats_tysum_18, atslab__0))), ATSPMVrefarg1(ATSPMVptrof(tmpref8021__3)))) ;
       | ^~~~~~~~~~
In file included from /var/home/petersen/.atspkg/0.3.13/lib/ats2-postiats-0.3.13/libats/libc/CATS/dirent.cats:44,
                 from .atspkg/c/src/polyglot.c:267:
/usr/include/dirent.h:183:12: note: declared here
  183 | extern int readdir_r (DIR *__restrict __dirp,
      |            ^~~~~~~~~
.atspkg/c/src/polyglot.c: In function ‘__patsfun_1861__1861__4’:
.atspkg/c/src/polyglot.c:250859:1: warning: ‘readdir_r’ is deprecated [-Wdeprecated-declarations]
250859 | ATSINSmove(tmp8022__4, atslib_libats_libc_readdir_r(ATSPMVrefarg0(env0), ATSPMVrefarg1(ATSPMVptrof(ATSSELcon(tmp8020__4, postiats_tysum_18, atslab__0))), ATSPMVrefarg1(ATSPMVptrof(tmpref8021__4)))) ;
       | ^~~~~~~~~~
In file included from /var/home/petersen/.atspkg/0.3.13/lib/ats2-postiats-0.3.13/libats/libc/CATS/dirent.cats:44,
                 from .atspkg/c/src/polyglot.c:267:
/usr/include/dirent.h:183:12: note: declared here
  183 | extern int readdir_r (DIR *__restrict __dirp,
      |            ^~~~~~~~~
.atspkg/c/src/polyglot.c: In function ‘__patsfun_1861__1861__5’:
.atspkg/c/src/polyglot.c:253801:1: warning: ‘readdir_r’ is deprecated [-Wdeprecated-declarations]
253801 | ATSINSmove(tmp8022__5, atslib_libats_libc_readdir_r(ATSPMVrefarg0(env0), ATSPMVrefarg1(ATSPMVptrof(ATSSELcon(tmp8020__5, postiats_tysum_18, atslab__0))), ATSPMVrefarg1(ATSPMVptrof(tmpref8021__5)))) ;
       | ^~~~~~~~~~
In file included from /var/home/petersen/.atspkg/0.3.13/lib/ats2-postiats-0.3.13/libats/libc/CATS/dirent.cats:44,
                 from .atspkg/c/src/polyglot.c:267:
/usr/include/dirent.h:183:12: note: declared here
  183 | extern int readdir_r (DIR *__restrict __dirp,
      |            ^~~~~~~~~
/usr/bin/ld: cannot find -lpthread
/usr/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status

Any ideas?

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

1 participant