Bug 40874 - libfpx wont build / wrong CFLAGS
Summary: libfpx wont build / wrong CFLAGS
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-22 10:00 UTC by Jan Stocker
Modified: 2002-07-22 19:04 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Stocker 2002-07-22 10:00:08 UTC
The needed line 

#CFLAGS+=       -DHAVE_WCHAR_H=1 -DHAVE_DLFCN_H=1

is commented out, but port includes wchar.h, so we get a duplicate definition.

Fix: 

Uncomment line..... cant understand why it is commented... 
My 4.6 box and -current has wchar.h...
How-To-Repeat: make port on -current.
Comment 1 Jan Stocker 2002-07-22 10:18:13 UTC
Uncommenting leads to no compiling errors, but i think the lib hasn't
linked correctly, cause building ImageMagick causes:

cc -DHAVE_CONFIG_H -I. -I. -I../magick -I../ -I..  -I/usr/X11R6/include 
-I/usr/local/include/freetype2 -I/usr/local/include -I/usr/X11R6/include
-I/X11  -O -pipe -march=pentiumpro -Wall -c `test -f 'composite.c' ||
echo './'`composite.c
/usr/local/bin/bash ../libtool --silent --mode=link cc  -O -pipe
-march=pentiumpro -Wall  -L/usr/local/lib -L/usr/X11R6/lib -o composite
-L/usr/local/lib -L/usr/X11R6/lib composite.o ../magick/libMagick.la  
../magick/.libs/libMagick.so: warning: tempnam() possibly used unsafely;
consider using mkstemp()
/usr/local/lib/libfpx.so: undefined reference to `operator
new[](unsigned)'
/usr/local/lib/libfpx.so: undefined reference to `operator
delete(void*)'
/usr/local/lib/libfpx.so: undefined reference to `__cxa_pure_virtual'
/usr/local/lib/libfpx.so: undefined reference to
`std::ios_base::Init::Init()'
/usr/local/lib/libfpx.so: undefined reference to `operator
delete[](void*)'
/usr/local/lib/libfpx.so: undefined reference to
`std::ios_base::Init::~Init()'
/usr/local/lib/libfpx.so: undefined reference to `operator
new(unsigned)'
gmake[1]: *** [composite] Error 1
gmake[1]: Leaving directory
`/ext/usr/ports/graphics/ImageMagick/work/ImageMagick-5.4.7/utilities'
gmake: *** [all-recursive] Error 1
*** Error code 2
Comment 2 Mikhail Teterin 2002-07-22 16:00:17 UTC
I have just commited a fix (I think). The trouble was with the
missing -lstdc++ :-( Please, confirm...

	-mi
Comment 3 Jan Stocker 2002-07-22 16:08:09 UTC
But i think it is not the correct way to link stdc++ by hand, you ve to
use "c++" for linking instead, it will use stdc++ by itself....


On Mon, 2002-07-22 at 17:00, Mikhail Teterin wrote:
> I have just commited a fix (I think). The trouble was with the
> missing -lstdc++ :-( Please, confirm...
> 
> 	-mi
>
Comment 4 Mikhail Teterin freebsd_committer freebsd_triage 2002-07-22 19:03:37 UTC
State Changed
From-To: open->closed

Originator confirms the problem is gone now. The question of what 
is better LDADD+=-lstdc++ (used) or LD=${CXX} (suggested by originator) 
remains.