Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Oct 2009 09:29:44 GMT
From:      Nathaniel Filardo <nwf@cs.jhu.edu>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/140073: silc-irssi-plugin crashes upon joining any channel
Message-ID:  <200910290929.n9T9Tigl012332@www.freebsd.org>
Resent-Message-ID: <200910290930.n9T9U2lG003361@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         140073
>Category:       ports
>Synopsis:       silc-irssi-plugin crashes upon joining any channel
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 29 09:30:02 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Nathaniel Filardo
>Release:        9.0-CURRENT
>Organization:
>Environment:
FreeBSD nwf 9.0-CURRENT FreeBSD 9.0-CURRENT #11: Mon Oct 19 22:08:50 EDT 2009     root@hydra.priv.oc.ietfng.org:/systank/obj/systank/src/sys/NWFKERN  sparc64

>Description:
This looks like http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=522080 .
>How-To-Repeat:
Build irssi-silc-plugin and the current irssi port.  Load silc, attempt to join channel, observe sparks.
>Fix:
The Debian guys wrote a custom build system to solve this problem, which I have pushed in some form or another to work on the version in ports (i.e., currently 1.1.8).

Using the attached Makefile.override and Makefile.override.PL (and gmake, sorry), my notes from this process say to ...

Run config, extract, configure as usual via the ports system.
Enter the work directory.

(cd lib; make)

## apps/irssi/src/silc/core/silc-expandos.c needs to be patched to include silcdefs.h
## apps/irssi/src/silc/core/silc-core.c needs to be patched to include glib/goption.h

gmake -f Makefile.override apps/irssi/src/fe-common/silc/libfe_silc.{so,a}
gmake -f Makefile.override apps/irssi/src/silc/core/libsilc_core.{so,a}

cp Makefile.override.PL apps/irssi/src/perl/silc/Makefile.PL
gmake -f Makefile.override build-perl

# This builds but I'm not sure what to do with it... trying "make install" in 
# apps/irssi/src/perl/silc/ tries to rebuild things and that's a bad idea.

# Manually copy the silc libraries over
cp lib/.libs/libsilc*.so /usr/local/lib/

# Manually copy the irssi libraries over
cp apps/irssi/src/fe-common/silc/libfe_silc.so /usr/local/lib/irssi/modules
cp apps/irssi/src/silc/core/libsilc_core.so /usr/local/lib/irssi/modules

# At this point it works to load silc and join channels...
# and doesn't crash (!) but this clearly is far from ideal as far as
# "getting it right".
# In any case, if somebody wants to clean this up, here it is.

Patch attached with submission follows:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	Makefile.override
#	Makefile.override.PL
#
echo x - Makefile.override
sed 's/^X//' >Makefile.override << 'a204fbcd70c823ed3acf8e56d040f028'
X
XLDFLAGS = -L$(CURDIR)/lib/.libs
XCFLAGS = \
X	-g \
X	-W -ggdb -Wall \
X	-I/usr/local/include/irssi \
X	-I/usr/local/include/irssi/src \
X	-I/usr/local/include/irssi/src/core \
X	-I/usr/local/include/irssi/src/fe-common/core \
X	-Iapps/irssi/src \
X	-I$(SILC_CORE_DIR) \
X	-Iincludes \
X	-I. \
X	$(addprefix -I,$(shell echo lib/silc* )) \
X	-fPIC \
X	-DUOFF_T_LONG -DHAVE_CONFIG_H=1 -DSILC_PLUGIN=1 \
X	-DPACKAGE=\"silc-client\" -DVERSION=\"$(VERSION)\" \
X	$(shell pkg-config --cflags glib-2.0) \
X
XPERL_INC = \
X	-I/usr/local/include/irssi \
X	-I/usr/local/include/irssi/src \
X	-I/usr/local/include/irssi/src/core \
X	-I/usr/local/include/irssi/src/fe-common/core \
X	-I$(CURDIR)/includes \
X	$(addprefix -I$(CURDIR)/,$(shell echo lib/silc* )) \
X	-I$(CURDIR)/apps/irssi/src \
X	-I$(CURDIR)/$(SILC_CORE_DIR)
XPERL_CFLAGS = \
X	-DUOFF_T_LONG -DSILC_PLUGIN=1 -DHAVE_PL_PERL \
X	$(shell pkg-config --cflags glib-2.0)
X
XSILC_CORE_DIR = apps/irssi/src/silc/core
XSILC_CORE_LIB = silc_core
XSILC_CORE_SRCS = \
X	clientutil.c \
X	silc-channels.c \
X	silc-core.c \
X	silc-nicklist.c \
X	silc-queries.c \
X	silc-servers.c \
X	silc-expandos.c \
X	silc-servers-reconnect.c \
X	silc-lag.c \
X	silc-chatnets.c \
X	silc-cmdqueue.c \
X	client_ops.c
XSILC_CORE_OBJS = $(addprefix $(SILC_CORE_DIR)/,$(subst .c,.o,$(SILC_CORE_SRCS)))
XSILC_CORE_LIBS = -lsilc -lsilcclient $(shell pkg-config --libs glib-2.0)
X
XFE_SILC_DIR = apps/irssi/src/fe-common/silc
XFE_SILC_LIB = fe_silc
XFE_SILC_SRCS = \
X	fe-common-silc.c \
X	fe-silc-channels.c \
X	fe-silc-messages.c \
X	fe-silc-queries.c \
X	fe-silcnet.c \
X	module-formats.c \
X	silc-modules.c
XFE_SILC_OBJS = $(addprefix $(FE_SILC_DIR)/,$(subst .c,.o,$(FE_SILC_SRCS)))
XFE_SILC_LIBS = $(shell pkg-config --libs glib-2.0)
X
X$(SILC_CORE_DIR)/lib$(SILC_CORE_LIB).a: $(SILC_CORE_OBJS)
X	$(AR) -rsc $@ $^ 
X
X$(SILC_CORE_DIR)/lib$(SILC_CORE_LIB).so: $(SILC_CORE_OBJS)
X	$(CC) -o $@ $^ $(LDFLAGS) -shared $(SILC_CORE_LIBS)
X
X$(FE_SILC_DIR)/lib$(FE_SILC_LIB).a: $(FE_SILC_OBJS)
X	$(AR) -rsc $@ $^
X
X$(FE_SILC_DIR)/lib$(FE_SILC_LIB).so: $(FE_SILC_OBJS)
X	$(CC) -o $@ $^ $(LDFLAGS) -shared $(SILC_CORE_LIBS)
X
Xapps/irssi/src/%.o: apps/irssi/src/%.c
X	$(CC) -o $@ -c $(CFLAGS) $<
X
Xbuild-perl:
X	cp $(CURDIR)/apps/irssi/src/perl/silc/Makefile.override.PL $(CURDIR)/apps/irssi/src/perl/silc/Makefile.PL
X	(cd $(CURDIR)/apps/irssi/src/perl/silc && \
X	 perl Makefile.PL \
X		INSTALLDIRS=vendor \
X		INC="$(PERL_INC)" CCFLAGS="$(PERL_CFLAGS)" && \
X	 $(MAKE))
X
Xbuild: build-perl $(SILC_CORE_DIR)/lib$(SILC_CORE_LIB).so $(FE_SILC_DIR)/lib$(FE_SILC_LIB).so
a204fbcd70c823ed3acf8e56d040f028
echo x - Makefile.override.PL
sed 's/^X//' >Makefile.override.PL << '4a31f55c742d5b8e817f60f4e00ffb1d'
Xuse ExtUtils::MakeMaker;
X
Xsub MY::post_constants {
X	'include ../../../Makefile.defines_int';
X}
X
XWriteMakefile('NAME' => 'Irssi::Silc',
X	      'LIBS' => '',
X	      'OBJECT' => '$(O_FILES)',
X	      'TYPEMAPS' => ['../common/typemap'],
X	      'VERSION_FROM' => './Silc.pm');
4a31f55c742d5b8e817f60f4e00ffb1d
exit



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910290929.n9T9Tigl012332>