From owner-freebsd-questions@FreeBSD.ORG Wed May 11 19:35:38 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 4989016A4CE for ; Wed, 11 May 2005 19:35:38 +0000 (GMT) Received: from malasada.lava.net (malasada.lava.net [64.65.64.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D8A643D55 for ; Wed, 11 May 2005 19:35:38 +0000 (GMT) (envelope-from cliftonr@lava.net) Received: by malasada.lava.net (Postfix, from userid 102) id AB1F7153882; Wed, 11 May 2005 09:35:37 -1000 (HST) Date: Wed, 11 May 2005 08:54:15 -1000 From: Clifton Royston To: freebsd-questions@freebsd.org Message-ID: <20050511185413.GA18096@tikitechnologies.com> Mail-Followup-To: freebsd-questions@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2i Resent-From: cliftonr@tikitechnologies.com Resent-Date: Wed, 11 May 2005 09:35:37 -1000 Resent-To: freebsd-questions@freebsd.org Resent-Message-Id: <20050511193537.AB1F7153882@malasada.lava.net> Subject: MySQL port building solution: -O is required 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, 11 May 2005 19:35:38 -0000 Here is the answer to the problem I was wrestling with a couple weeks ago: /usr/ports/databases/mysql41-server and /usr/ports/databases/mysql40-server do *not* build on 4.x systems unless *some* level of optimization is turned on. 'CFLAGS=' fails on 4.x releases; 'CFLAGS=-O' works. (as does -O -pipe and probably higher levels.) Not tested on 5-STABLE. I'm guessing that the machines where ports building is tested have '-O -pipe' or similar as a minimum setting. However /etc/make.conf has no default setting for CFLAGS, so with the "out of box" default settings of everything the build of this port will consistently fail. The problem appears to be, from some cursory digging through the sources, that a number of MySQL functions including MySQL's internal interfaces to the thread libraries are defined only via inlining if the OS *platform* is known to support it, but inlining is not actually enabled (at least in GCC 2.95) unless -O or better is set. I tracked this down once I realized that the key difference between the system where I could build it and the system where I couldn't was that the former's /etc/make.conf was heavily customized, and the latter's was untouched except for the variables set by "use.perl ports". I'll file a pr on this, as well as the necessary tweaking on my own system. -- 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