When I tried to update libmal to 0.42 with portmaster, I enabled the OPTIONS PNG, THREADS, and USB in the palm/pilot-link port. This caused palm/libmal to fail to build due to libpisock.so was compiled with thread support. (cd .libs && rm -f libmal.la && ln -s ../libmal.la libmal.la) if cc -DHAVE_CONFIG_H -I. -I. -I.. -Wall -g -DMALSYNC -I../malsync/mal/common -I../malsync/mal/client/common -I../malsync/mal/client/unix -I/usr/local/include -MT malsync.o -MD -MP -MF ".deps/malsync.Tpo" -c -o malsync.o malsync.c; \ then mv -f ".deps/malsync.Tpo" ".deps/malsync.Po"; else rm -f ".deps/malsync.Tpo"; exit 1; fi /bin/sh ../libtool --tag=CC --mode=link cc -Wall -g -DMALSYNC -I../malsync/mal/common -I../malsync/mal/client/common -I../malsync/mal/client/unix -I/usr/local/include -o malsync malsync.o -L/usr/local/lib -lpisock libmal.la *** Warning: Linking the executable malsync against the loadable module *** libmal.so is not portable! cc -Wall -g -DMALSYNC -I../malsync/mal/common -I../malsync/mal/client/common -I../malsync/mal/client/unix -I/usr/local/include -o .libs/malsync malsync.o -L/usr/local/lib ./.libs/libmal.so -lpisock -Wl,--rpath -Wl,/usr/local/lib /usr/local/lib/libpisock.so: undefined reference to `pthread_create' /usr/local/lib/libpisock.so: undefined reference to `pthread_cancel' /usr/local/lib/libpisock.so: undefined reference to `pthread_setcanceltype' /usr/local/lib/libpisock.so: undefined reference to `pthread_cond_timedwait' gmake[2]: *** [malsync] Error 1 gmake[2]: Leaving directory `/usr/ports/palm/libmal/work/libmal-0.42/src' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/usr/ports/palm/libmal/work/libmal-0.42' gmake: *** [all] Error 2 *** Error code 2 Stop in /usr/ports/palm/libmal. I believe this problem may be showing up do to the following conditions in the palm/pilot-link port: When THREADS is selected, LDFLAGS are set to PTHREAD_LIBS, but are not added to the CONFIGURE_ENV. Then when USB is selected, additional options are added to LDFLAGS, and then the CONFIGURE_ENV is set to use the LDFLAGS during the configure stage. Fix: The fix for palm/pilot-link is to change: .if defined(WITH_USB) LIB_DEPENDS+= usb-0.1.8:${PORTSDIR}/devel/libusb CONFIGURE_ARGS+=--enable-libusb CONFIGURE_ENV+="LDFLAGS=${LDFLAGS} -L${PREFIX}/lib -lusb" .endif to .if defined(WITH_USB) LIB_DEPENDS+= usb-0.1.8:${PORTSDIR}/devel/libusb CONFIGURE_ARGS+=--enable-libusb LDFLAGS+=-L${PREFIX}/lib -lusb" .endif CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}" This would then allow PTHREAD_LIBS to pass to the configure stage. Then add the following to the palm/libmal port: OPTIONS= THREADS "built-in thread safety" on .if !defined(WITHOUT_THREADS) LDFLAGS+= ${PTHREAD_LIBS} CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}" .endif How-To-Repeat: Install the palm/pilot-link port with both THREADS and USB enabled. Then try to build palm/libmal.
State Changed From-To: open->feedback Awaiting maintainers feedback
pav 2006-10-07 12:51:39 UTC FreeBSD ports repository Modified files: palm/pilot-link Makefile Log: - Record -pthread requirement in pkg-config file, if threads are turned on - USB always needs threads turned on PR: ports/104064 Revision Changes Path 1.80 +15 -4 ports/palm/pilot-link/Makefile _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
pav 2006-10-07 12:52:14 UTC FreeBSD ports repository Modified files: palm/libmal Makefile Added files: palm/libmal/files patch-configure Log: - Refer to pkg-config for pilot-link linking details. This will fix the build when pilot-link was compiled with threads PR: ports/104064 Revision Changes Path 1.12 +1 -1 ports/palm/libmal/Makefile 1.1 +11 -0 ports/palm/libmal/files/patch-configure (new) _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
State Changed From-To: feedback->closed I think I fixed this real clever.