This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Trying to build crm114 (20050721) under CygWin 1.5.18-1


Herb Martin wrote:

cannot find -ltre
collect2: ld returned 1 exit status
make[1]: *** [crm114_tre] Error 1


LDFLAGS += -L/usr/local/lib LIBS += -ltre -lintl -liconv (and trying -ltre at the end; is THIS the order
you were referencing?)


The dependency tha that is failing looks like this:

crm114_tre: $(OFILES) crmregex_tre.o
# Note: if you haven't installed TRElib, the next step # will get an error.
# For TRElib, look in the TRE sub-directory of this kit.
# Remember to use ./configure --enable-static for static libs.
# You will also need to add /usr/local/lib to /etc/ld.so.conf,
# and then run ldconfig (as root) to set the library up and make
# the library known to the static and runtime linkers.
$(CC) $(LDFLAGS) $(LIBS) $(OFILES) \
crmregex_tre.o \
-lm -ltre -o crm114_tre

This is wrong. Try this instead:


 	$(CC) $(LDFLAGS) $(OFILES) \
 	  crmregex_tre.o \
 	  -ltre $(LIBS) -o crm114_tre



My tre libs looks like this:

$ d /usr/local/lib/*tre*
rw-r--r--  herbm:None  349K  Aug 18 21:29  libtre.a
rwxr-xr-x  herbm:None   789  Aug 18 21:29  libtre.la

Then you should go with the settings as you posted above:


LDFLAGS += -L/usr/local/lib
LIBS += -lintl -liconv


$ d ./tre-0.7.2/lib
rw-r--r--  herbm:None   18K  Aug 18 19:34  Makefile
rwxr-xr-x  herbm:None   707  Dec 10  2004  Makefile.am
rwxr-xr-x  herbm:None   19K  Dec 11  2004  Makefile.in
rwxr-xr-x  herbm:None    3K  Apr 24  2004  gettext.h
rw-r--r--  herbm:None   788  Aug 19 05:58  libtre.la
rwxr-xr-x  herbm:None  2.7K  Nov 21  2004  readme


Here is no library. Just the libtool .la helper file.


Current error looks like this:
[snip]
gcc -static -L./tre-0.7.2/lib -L/usr/local/lib   -ltre -lintl -liconv
*.o \
  -lm -ltre -o crm114_tre
/usr/local/lib/libtre.a(regerror.o): In function `regerror':
/etc/mail/spamassassin/crm114-20050721-BlameNeilArmstrong.src/tre-0.7.2/lib/
regerror.c:68: undefined reference to `_libintl_gettext'
collect2: ld returned 1 exit status
make[1]: *** [crm114_tre] Error 1


Change the Makefile so that $LIBS are at the end behind the objects
and libtre as noted above since libtre reqwuires libintl and the
linker reads command lines from right to left.


Gerrit -- =^..^=

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]