“Cannot find -l -l” error when compiling GotoBLAS2 under Ubuntu 12.04LTS

人走茶凉 提交于 2019-12-11 11:23:45

问题


GotoBLAS is an old package but some wonderful open source projects are depending upon it. I obtainded it from github.com:

https://github.com/dofi/gotoBLAS/tree/master/Downloads

But I encountered the following compiling error (wrapped for legibility),

gcc -O2 -DEXPRECISION -m128bit-long-double -Wall -m64 -DF_INTERFACE_GFORT
 -fPIC  -DSMP_SERVER -DMAX_CPU_NUMBER=2 -DASMNAME= -DASMFNAME=_ -DNAME=_
 -DCNAME= -DCHAR_NAME=\"_\" -DCHAR_CNAME=\"\" -I.. -w -o linktest linktest.c
 ../libgoto2_barcelonap-r1.13.so -L/usr/lib/gcc/x86_64-linux-gnu/4.6 
 -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu 
 -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib 
 -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu 
 -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../..  
 -l -l -lgfortran -lm -lquadmath -lm -lc   && echo OK.
/usr/bin/ld: cannot find -l-l
collect2: ld returned 1 exit status
make[1]: *** [../libgoto2_barcelonap-r1.13.so] Error 1
make[1]: Leaving directory `/root/Downloads/GotoBLAS2/exports'
make: *** [shared] Error 2

I tried to trace the cause and found each time compilation a file Makefile.conf was generated automatically with following argument set (again, wrapped for legibility, with backslashed newlines);

FEXTRALIB=-L/usr/lib/gcc/x86_64-linux-gnu/4.6 \
 -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu \
 -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib \
 -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu \
 -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../..  \
 -l -l -lgfortran -lm -lquadmath -lm -lc  

and in GotoBLAS2/exports/Makefile,

../$(LIBSONAME) : ../$(LIBNAME) linux.def linktest.c
    $(CC) $(CFLAGS) -shared -o ../$(LIBSONAME) \
    -Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \
    -Wl,--retain-symbols-file=linux.def $(EXTRALIB)
    $(CC) $(CFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
    rm -f linktest

Notice the -l -l. I guess I'm still missing some other necessary libraries? What could they be? How can I resolve this?

来源:https://stackoverflow.com/questions/29271676/cannot-find-l-l-error-when-compiling-gotoblas2-under-ubuntu-12-04lts

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!