From owner-freebsd-hackers@freebsd.org Tue Jun 30 08:19:03 2015 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C51F1990883 for ; Tue, 30 Jun 2015 08:19:03 +0000 (UTC) (envelope-from saper@saper.info) Received: from m.saper.info (m.saper.info [IPv6:2a01:4f8:a0:7383::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "m.saper.info", Issuer "Marcin Cieslak 2011" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6335C1FDA for ; Tue, 30 Jun 2015 08:19:03 +0000 (UTC) (envelope-from saper@saper.info) Received: from m.saper.info (saper@m.saper.info [IPv6:2a01:4f8:a0:7383::]) by m.saper.info (8.14.9/8.14.9) with ESMTP id t5U8J17j043827 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Tue, 30 Jun 2015 08:19:01 GMT (envelope-from saper@saper.info) Received: from localhost (saper@localhost) by m.saper.info (8.14.9/8.14.9/Submit) with ESMTP id t5U8J05f043820 for ; Tue, 30 Jun 2015 08:19:01 GMT (envelope-from saper@saper.info) X-Authentication-Warning: m.saper.info: saper owned process doing -bs Date: Tue, 30 Jun 2015 08:19:00 +0000 From: Marcin Cieslak To: freebsd-hackers@freebsd.org Subject: Build for profiling? Got //usr/lib/libc_p.a(sbrk.po): undefined reference to symbol '_end' Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2015 08:19:03 -0000 I am trying to compile https://github.com/sass/libsass instrumented for profiling. As far as I understand this does not work with clang, so I am trying with gcc version 4.8.5 20150212 (prerelease) (FreeBSD Ports Collection). This is a shared library in C++ that gets loaded by node (www/node). I have a world built with profiling libraries, I have additionally ran "make install INSTALL_PIC_ARCHIVE=yes" in lib/libc, lib/msun and lib/libcxxrt directories (the latter probably not needed). Here's config.log output: configure:3344: checking whether the C++ compiler works configure:3366: g++48 -pg -g conftest.cpp >&5 /usr/local/bin/ld: //usr/lib/libc_p.a(sbrk.po): undefined reference to symbol '_end' //lib/libc.so.7: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status configure:3370: $? = 1 configure:3408: result: no configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libsass" | #define PACKAGE_TARNAME "libsass" | #define PACKAGE_VERSION "3.2.5-9-gbe07-dirty" | #define PACKAGE_STRING "libsass 3.2.5-9-gbe07-dirty" | #define PACKAGE_BUGREPORT "support@moovweb.com" | #define PACKAGE_URL "" | #define PACKAGE "libsass" | #define VERSION "3.2.5-9-gbe07-dirty" | /* end confdefs.h. */ | | int | main () | { | | ; | return 0; | } ~Marcin