Description of problem:
Traditionally environment variable CC contains C compiler name while CXX
contains C++ compiler name. For example I have CC=gcc, CXX=g++. If you try to
build stardict with these environment settings you will get a lot of undefined
reference during build because stardict's Makefile will use $CC=gcc as C++
compiler therefore libstdc++ won't be linked. Error happens because Makefile uses
COMPILE.c and LINK.c macroses which are for plain C compilation. It softens by
declaration CC=g++ in begin of makefile, but as make is called with -e option
(environment variables precedence over variables from makefiles) environment's
CC=gcc prevail, that's why gcc is used to build stardict.
To be correct you should use at least LINK.cpp macro instead of LINK.c (as gcc
do C++ compilation for .cc files). I'll attach the patch with these changes, please
take a look at it.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. install SRPM
2. from SPECS directory:
CC=gcc rpmbuild -bb --define "_topdir `pwd`/.." --define "_tmpdir `pwd`/../tmp"
Succesfully built package
Created attachment 89346 [details]
Dump done by `CC=gcc rpmbuild -bb --define "_topdir `pwd`/.." --define "_tmpdir `pwd`/../tmp" `
Created attachment 89347 [details]
Patch which fix Makefile to use C++ compilers
Updated to latest 2.4.4. Should be fine now