Can't compile Inkscape

Hello, I try to compile graphics/inkscape and I get these errors:
Code:
/usr/local/lib/libwpg-0.2.so: undefined reference to `std::ctype<char>::_M_widen_init() const@GLIBCXX_3.4.11'
/usr/local/lib/libglibmm-2.4.so: undefined reference to `std::__detail::_List_node_base::_M_unhook()@GLIBCXX_3.4.15'
/usr/local/lib/libgtkmm-2.4.so: undefined reference to `std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)@GLIBCXX_3.4.15'
/usr/local/lib/libwpg-0.2.so: undefined reference to `std::ctype<char>::_M_widen_init() const@GLIBCXX_3.4.11'
/usr/local/lib/libglibmm-2.4.so: undefined reference to `std::__detail::_List_node_base::_M_unhook()@GLIBCXX_3.4.15'
/usr/local/lib/libgtkmm-2.4.so: undefined reference to `std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)@GLIBCXX_3.4.15'
gmake[2]: *** [inkview] Ошибка 1

I have installed gcc46, but I have tried to compile with and without these settings in make.conf:
Code:
CPUTYPE?=core2
NO_CPU_CFLAGS=false
NO_CPU_COPTFLAGS=false

CFLAGS= -O2 -pipe -fno-strict-aliasing
COPTFLAGS= -O2 -pipe
OPTIMIZED_CFLAGS=YES
WITH_CPUFLAGS=YES
WITH_OPTIMIZED_CFLAGS=YES
MAKE_JOBS_NUMBER?=3
WITH_NEW_XORG=YES

.if !empty(.CURDIR:M/usr/ports/*) && exists(/usr/local/bin/gcc46)
CC=gcc46
CXX=g++46
CPP=cpp46
CFLAGS+=-mssse3

# Legacy ports
LEGACY_PORTS=   multimedia/cuse4bsd-kmod \
                net/libproxy \
                sysutils/fusefs-kmod \
                x11/libXtst \
                www/webkit-gtk2 \
                editors/openoffice-3 \
                audio/espeak \
                sysutils/fusefs-kmod \
                graphics/graphviz \
                x11/nvidia-driver-304

.for port in ${LEGACY_PORTS}
.if ${.CURDIR:M*/ports/$(port)}
CC=             cc
CXX=            c++
CPP=            cpp
CFLAGS= -O2 -pipe -fno-strict-aliasing
.endif
.endfor
.endif

What can I do?
 
jeltoesolnce said:
Code:
CFLAGS= -O2 -pipe -fno-strict-aliasing
COPTFLAGS= -O2 -pipe
Remove these. They do not do what you think they do. Everything already uses the most optimal compiler switches. Setting them by hand usually does more damage than good.
 
Well, I read the article, thanks.

I have reinstalled libraries:
and I looked at /usr/local/lib/gcc46 and I did not find there a target for above sources. Maybe, I did not understand this article. Now I run this command: portupgrade -Rf graphics/libwpg -l <some_file>.
Maybe this will help.
 
You can also use script(1)() to do save the output of your compilation process (I have a bad experience with [cmd=""]portupgrade -l[/cmd]), like
Code:
# script /var/tmp/mycompile.out
# portupgrade -Rf graphics/libwpg
# exit
and then inspect its contents with your favorite text editor. I would also suggest removing [cmd=""]MAKE_JOBS_NUMBER?=3[/cmd] from your /etc/make.conf -- that's what the -pipe flag is for.

In any case, know that not all ports are sure to build with a non-standard gcc compiler. Consider building those ports with clang.
 
jozze said:
In any case, know that not all ports are sure to build with a non-standard gcc compiler. Consider building those ports with clang.

Many ports come from Linux where gcc version 4.6 or newer is the default compiler, those ports should compile fine with gcc from ports.
 
Back
Top