Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

2 Answers

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
add comment

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
    
Fixed: `which ld` –  koenigdmj Jul 29 '09 at 4:40
    
there is meant to be backticks around "which ld" but either i'm not escapeing them right, or there is a bug. –  resonator Jul 29 '09 at 4:40
    
cheers mate. :) –  resonator Jul 29 '09 at 4:41
    
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
show 1 more comment

Your Answer

 
discard

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.