pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/39952: net/freeradius2 doesn't build if libradius not presnt

>Number:         39952
>Category:       pkg
>Synopsis:       net/freeradius2 doesn't build if libradius not presnt
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 18 16:05:00 +0000 2008
>Originator:     Edgar Fuß
>Release:        pkgsrc-2008Q3
Mathematisches Institut der Universität Bonn
On Mac OS X, building net/freeradius2 fails with

 gcc -pipe -O2 -I.../pkgsrc/net/freeradius2/work/.buildlink/include 
-I.../pkgsrc/net/freeradius2/work/freeradius-server-2.0.5/libltdl -c opendir.c 
-o opendir.o >/dev/null 2>&1
.../pkgsrc/net/freeradius2/work/freeradius-server-2.0.5/libtool --mode=link gcc 
-release 2.0.5 \
        -module -export-dynamic -L/usr/pkg/lib -L/usr/lib 
-L../../../src/lib/.libs/ -lradius -o     \
        -rpath /usr/pkg/lib rlm_mschap.lo smbdes.lo opendir.lo rlm_mschap.c 
smbdes.c opendir.c 
  -lcrypto -L/usr/pkg/lib -L/usr/pkg/lib -framework DirectoryService -lresolv   
gcc ${wl}-flat_namespace ${wl}-undefined ${wl}suppress -o 
.libs/ -bundle  .libs/rlm_mschap.o .libs/smbdes.o 
-L.../pkgsrc/net/freeradius2/work/.buildlink/lib -lradius 
 -lcrypto -lresolv -lpthread -framework DirectoryService
/usr/bin/ld: can't locate file for: -lradius
collect2: ld returned 1 exit status
gmake[6]: *** [] Error 1

This is because there's no native libradius on the system and it looks like 
freeradius 2 uses libfreeradius-radius, not libradius.
The culprit seems to be the following substituion in Makefile:
SUBST_SED.make= -e "s|RLM_LDFLAGS       =|RLM_LDFLAGS   = \
                                -L../../../src/lib/.libs/ -lradius|g"
changing radius to freeradius-radius seems to fix the problem.
cd net/freeradius2; bmake build
--- Makefile.orig       2008-06-20 22:57:39.000000000 +0200
+++ Makefile    2008-11-18 16:59:55.000000000 +0100
@@ -74,7 +74,7 @@
 SUBST_FILES.make=      src/modules/rlm_mschap/Makefile \
 SUBST_SED.make=        -e "s|RLM_LDFLAGS       =|RLM_LDFLAGS   = \
-                               -L../../../src/lib/.libs/ -lradius|g"
+                               -L../../../src/lib/.libs/ -lfreeradius-radius|g"
 SUBST_SED.make+=       -e "s|RLM_SQL_LIBS      =|RLM_SQL_LIBS  = \
 SUBST_MESSAGE.make=    Fixing Makefiles.

Home | Main Index | Thread Index | Old Index