Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to build a LIBS from the Thai Computational Linguistics Laboratory from source.

I am following the instructions as per their readme, which states

2. Installation

2.1) In the libs base directory, type:

$ ./configure
$ make

However, ld complains about 'cannot find -ll'.

if gcc -DHAVE_CONFIG_H -I. -I. -I../..  -W -Wall -I../../src/libs   -g -O2 -MT libs-predict.o -MD -MP -MF ".deps/libs-predict.Tpo" -c -o libs-predict.o libs-predict.c; \
        then mv -f ".deps/libs-predict.Tpo" ".deps/libs-predict.Po"; else rm -f ".deps/libs-predict.Tpo"; exit 1; fi
mode=link g++  -g -O2  -o libs-predict  libs-predict.o -L../../src/libs -llibs -lm -ll
/usr/bin/ld: cannot find -ll
collect2: ld returned 1 exit status
make[3]: [libs-predict] Error 1 (ignored)

What library is this and what package do I need to install to have it?

share|improve this question
can you post the steps you're taking to do this build? That sure looks like a command line switch mistakenly taken as a command. – Avery Payne Jul 29 '09 at 4:34
up vote 2 down vote accepted

The library libl.a is classically the support library for AT&T Lex - it provides a dummy version of yywrap() and main(), and some other support functions. If you are using Flex, then I don't think any library is needed - the code is self-contained (as long as you provide your own version of yywrap; if you don't, use -lfl). So, you probably just need to arrange to remove the '-ll' from the command line.

If that is too hard, then create yourself a file garbage.c containing:

int podunk = 0;

Compile it to garbage.o and create a dummy libl.a:

gcc -c garbage.c
ar r libl.a garbage.o

The linker should pick up this dummy library, find nothing of relevance in it, and continue its merry way onwards.

share|improve this answer

What if you run $(which ld) (using command substitution, or you can use backticks in place of $(…)) instead of just ld?

If that helps, then type in alias -p and see if you have an alias set for the ld command which is causing the -ll switch to be sent.

share|improve this answer
I'm not calling ld directly, that's make at work. I've updated the question to make this clearer. – saffsd Jul 29 '09 at 4:43
take a look at line 189 of "src/libs-cmd/Makefile". Maybe you can modify the command there to make it work. – resonator Jul 29 '09 at 4:59
I've gone and removed the -ll, and that seems to work. – saffsd Jul 29 '09 at 5:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.