From owner-freebsd-questions@FreeBSD.ORG Mon Mar 17 04:33:55 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBCE9106566C for ; Mon, 17 Mar 2008 04:33:55 +0000 (UTC) (envelope-from lenzi@k1.com.br) Received: from netuno.levier.com.br (netuno.levier.com.br [201.47.3.162]) by mx1.freebsd.org (Postfix) with ESMTP id 77A728FC1B for ; Mon, 17 Mar 2008 04:33:55 +0000 (UTC) (envelope-from lenzi@k1.com.br) Received: from levier.com.br (localhost [127.0.0.1]) by netuno.levier.com.br (8.14.2/8.14.1) with ESMTP id m2H3lEVp044326 for ; Mon, 17 Mar 2008 01:33:53 -0300 (BRT) (envelope-from lenzi@k1.com.br) X-MessageWall-Score: 0 (levier.com.br) Received: from [200.138.85.102] (authenticated as k1) by levier.com.br (MessageWall 1.0.8) with SMTP; 17 Mar 2008 04:33:52 -0000 From: User Lenzi To: freebsd-questions@freebsd.org In-Reply-To: <20080315010138.ddec4e8e.ejcerejo@optonline.net> References: <94136a2c0803101454l6ca76c99ma1fa1083d7ea2137@mail.gmail.com> <20080310231502.V7454@wojtek.tensor.gdynia.pl> <1205268305.52059.16.camel@localhost> <20080315010138.ddec4e8e.ejcerejo@optonline.net> Date: Mon, 17 Mar 2008 01:33:51 -0300 Message-Id: <1205728431.3323.0.camel@k2.cwb.casa> Mime-Version: 1.0 X-Mailer: Evolution 2.12.3 FreeBSD GNOME Team Port Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: EVOLUTION SLOW START , a workaround X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Mar 2008 04:33:56 -0000 > I'm trying to use your patch but it fails to apply patch. > It results in: > > ecerejo# patch -uspl File to patch: patch-gmodule::gmodule-dl.c > 4 out of 4 hunks failed--saving rejects to patch-gmodule::gmodule-dl.c.rej > > OK, probably, it is because you did not put the module (the patch in the correct place) the patch I publish on the email is to replace the glib patch that is located in: /usr/ports/devel/glib20/files/patch-gmodule::gmodule-dl.c the idea is: you copy the code from the email, and replace the file in the /usr/ports/devel/glib20/files/patch-gmodule::gmodule-dl.c and then just build glib20 again. either by the comand (cd /usr/ports/devel/glib20;make clean deinstall install) or portupgrade -fp devel/glib20 should work.... There is no need to rebuild evolution. the patch works with glib versions 2 tested on glib2.12 till 2.16 (the last one). ================cut=========================== --- gmodule/gmodule-dl.c.orig 2008-02-07 03:24:53.000000000 -0200 +++ gmodule/gmodule-dl.c 2008-03-11 18:53:44.000000000 -0300 @@ -73,6 +73,14 @@ #endif /* RTLD_GLOBAL */ +static char *special_names[]={ + "g_module_check_init", + "g_module_unload", + "e_plugin_lib_enable", + NULL +}; + + /* --- functions --- */ static gchar* fetch_dlerror (gboolean replace_null) @@ -106,6 +114,7 @@ static gpointer _g_module_self (void) { +#ifndef __FreeBSD__ gpointer handle; /* to query symbols from the program itself, special link options @@ -117,6 +126,9 @@ g_module_set_error (fetch_dlerror (TRUE)); return handle; +#else + return RTLD_DEFAULT; +#endif } static void @@ -141,9 +153,19 @@ { gpointer p; gchar *msg; + char **pn; fetch_dlerror (FALSE); - p = dlsym (handle, symbol_name); + + for (pn=special_names;*pn;pn++) { + if (!strcmp(*pn,symbol_name)) { + p=dlsym(RTLD_NEXT,symbol_name); + break; + } + } + + if (! *pn) + p = dlsym (handle, symbol_name); msg = fetch_dlerror (FALSE); if (msg) g_module_set_error (msg); ===============================cut==========================