Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Feb 2012 16:17:36 +0530
From:      Gautam <list@execve.net>
To:        freebsd-ports@freebsd.org
Subject:   graphics/png does not build with lang/gcc
Message-ID:  <CAD9pFYAY0Lu9v7ApS0zt4WjYOKMrTMrJ0nTq4viCEAJY1MJzpQ@mail.gmail.com>

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

I am running GENERIC on

FreeBSD  9.0-STABLE FreeBSD 9.0-STABLE #2: Mon Jan 30 04:18:20 IST 2012

with the tree csupped just before the build.

I setup lang/gcc as per
http://www.freebsd.org/doc/en/articles/custom-gcc/article.html

added following to /etc/make.conf
CC=gcc46
CXX=g++46
CPP=cpp46

and the following to /etc/libmap.config
libgcc_s.so.1   gcc46/libgcc_s.so.1
libgomp.so.1    gcc46/libgomp.so.1
libobjc.so.3    gcc46/libobjc.so.2
libssp.so.0     gcc46/libssp.so.0
libstdc++.so.6  gcc46/libstdc++.so.6


When I tried to rebuild some ports, I found a problem with linking
graphics/png.

I found a similar problem mentioned in
http://lists.freebsd.org/pipermail/freebsd-ports/2010-June/062166.html*
*but no conclusion to the same.

# idprio 31 make
===>  License check disabled, port has not defined LICENSE
===>  Found saved configuration for png-1.4.8
===>  Extracting for png-1.4.8
=> SHA256 Checksum OK for libpng-1.4.8.tar.xz.
=> SHA256 Checksum OK for libpng-1.4.8-apng.patch.gz.
.....
gcc46 -fpic -DPIC -O2 -pipe -march=pentium4 -fno-strict-aliasing
-march=pentium4 -I. -std=gnu99 -fstack-protector  -c pngpread.c -o
pngpread.So
gzip -cn libpng.3 > libpng.3.gz
gzip -cn libpngpf.3 > libpngpf.3.gz
gzip -cn png.5 > png.5.gz
gcc46 -O2 -pipe -march=pentium4 -fno-strict-aliasing -march=pentium4 -I.
-std=gnu99 -fstack-protector  -c pngtest.c
building static png library
building shared library libpng.so.6
ranlib libpng.a
pngread.So: In function `png_create_read_struct_2':
pngread.c:(.text+0x4e7): undefined reference to `__stack_chk_fail_local'
pngrutil.So: In function `png_inflate':
pngrutil.c:(.text+0x166): undefined reference to `__stack_chk_fail_local'
pngrutil.So: In function `png_decompress_chunk':
pngrutil.c:(.text+0x6e6): undefined reference to `__stack_chk_fail_local'
pngrutil.So: In function `.L69':
pngrutil.c:(.text+0x90f): undefined reference to `__stack_chk_fail_local'
pngrutil.So: In function `png_handle_cHRM':
pngrutil.c:(.text+0x1431): undefined reference to `__stack_chk_fail_local'
pngrutil.So:pngrutil.c:(.text+0x19d9): more undefined references to
`__stack_chk_fail_local' follow
collect2: ld returned 1 exit status
*** Error code 1
gcc46 -O2 -pipe -march=pentium4 -fno-strict-aliasing -march=pentium4 -I.
-std=gnu99 -fstack-protector  -L. -static -o pngtest pngtest.o -lpng -lz -lm
1 error
*** Error code 1

Stop in /usr/ports/graphics/png.
*** Error code 1

Stop in /usr/ports/graphics/png.
---


Any pointers?

Thanks,
Gautam*
*



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