From owner-freebsd-questions@FreeBSD.ORG Wed Apr 20 03:22:30 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6E8C616A4CE for ; Wed, 20 Apr 2005 03:22:30 +0000 (GMT) Received: from malasada.lava.net (malasada.lava.net [64.65.64.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id 240F743D2D for ; Wed, 20 Apr 2005 03:22:30 +0000 (GMT) (envelope-from cliftonr@lava.net) Received: by malasada.lava.net (Postfix, from userid 102) id A37C5153884; Tue, 19 Apr 2005 17:22:29 -1000 (HST) Date: Tue, 19 Apr 2005 17:22:29 -1000 From: Clifton Royston To: freebsd-questions@freebsd.org Message-ID: <20050420032228.GG17236@tikitechnologies.com> Mail-Followup-To: freebsd-questions@freebsd.org References: <20050420000238.GE17236@tikitechnologies.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050420000238.GE17236@tikitechnologies.com> User-Agent: Mutt/1.4.2i Subject: Re: Problem linking MySQL 4.1.11 via FreeBSD 4.10 ports X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Apr 2005 03:22:30 -0000 On Tue, Apr 19, 2005 at 02:02:39PM -1000, Clifton Royston wrote: > When I try to make the current port of the MySQL 4.1 server under > FreeBSD 4.10, I get a huge stream of "undefined reference" errors at > the link step for mysqld. .... More factoids - the same error continues to happen: * After rebuilding libtool 1.5.10 to make sure it's OK, as suggested to me offlist. * After rebuilding the linuxthreads port to make sure the library is OK. * After trying the same with MySQL 4.0 (mysql40-server) to make sure it's not a ports problem specific to 4.1. I started doing a bunch of find ... | xargs grep 'mutex_enter_func' and the like for the undefined symbols, and it appears that at least some of the problematic functions I'm looking at are defined internal to MySQL's libraries, and are intended to be inlined. However clearly they can't be succeeding, or they wouldn't be showing up as external references to the link phase. The function mutex_enter_func and some similar ones, for instance, are defined in files with a ".ic" extension - C files with heavy inlining of assembler - and they are defined with type "UNIV_INLINE". In innobase/include/univ.i this shows up thus: #if (!defined(UNIV_DEBUG) && !defined(INSIDE_HA_INNOBASE_CC) && !defined(UNIV_MUST_NOT_INLINE)) /* Definition for inline version */ #ifdef __WIN__ #define UNIV_INLINE __inline #else /* config.h contains the right def for 'inline' for the current compiler */ #if (__GNUC__ == 2) #define UNIV_INLINE extern inline #else /* extern inline doesn't work with gcc 3.0.2 */ #define UNIV_INLINE static inline #endif #endif #else /* If we want to compile a noninlined version we use the following macro definitions: */ #define UNIV_NONINL #define UNIV_INLINE #endif /* UNIV_DEBUG */ ... so I can see that gcc 2.95 and gcc 3.3 would be handled quite differently by these conditional defines. I am starting to think this might be a toolchain issue, where the ports have gotten out of sync with what the default build environment is for 4.1. Can anyone please verify for me that the mysql40-server and/or mysql41-server ports actually *do* build under gcc 2.95.4 as installed on a fresh-out-of-box 4.x system? I'd really rather not have to upgrade the compiler toolchain just to build this port. -- Clifton -- Clifton Royston -- cliftonr@tikitechnologies.com Tiki Technologies Lead Programmer/Software Architect "I'm gonna tell my son to grow up pretty as the grass is green And whip-smart as the English Channel's wide..." -- 'Whip-Smart', Liz Phair