ERRORS: rpm.spec

Jeffrey Johnson n3npq at me.com
Tue Jan 10 18:11:54 CET 2017


> On Jan 10, 2017, at 11:45 AM, Elan Ruusamäe <glen at pld-linux.org> wrote:
> 
> On 10.01.2017 18:38, Jeffrey Johnson wrote:
>> 	What is the issue here?
> and some more sources (c++) affected:
> 
> /usr/lib64/ccache/x86_64-pld-linux-gcc -DHAVE_CONFIG_H -I.  -I. -I. -I./build -I./lib -I./lib -I./rpmdb -I./rpmio -I./misc -I./lua/local -I./lua/local -I./lua -I./lua  -DRPM_OS_LINUX=040134 -I/usr/include/db5.2 -I/usr/include/ossp-uuid -I/usr/include/ossp-uuid -fopenmp -O2 -fwrapv -pipe -Wformat -Werror=format-security -gdwarf-4 -fno-debug-types-section -fvar-tracking-assignments -g2 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -fPIC -march=x86-64 -gdwarf-4 -fno-debug-types-section -fvar-tracking-assignments -g2  -D_GNU_SOURCE -D_REENTRANT -DIAM_RPMBT -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV -o rpm.o -c ./rpmqv.cc
> In file included from /usr/include/c++/6.3.0/stdlib.h:36:0,
>                 from ./system.h:196,
>                 from ./rpmqv.cc:1:
> /usr/include/c++/6.3.0/cstdlib:143:11: error: '::getenv' has not been declared
>   using ::getenv;
>           ^~~~~~
> In file included from ./system.h:196:0,
>                 from ./rpmqv.cc:1:
> /usr/include/c++/6.3.0/stdlib.h:62:12: error: 'std::getenv' has not been declared
> using std::getenv;
>            ^~~~~~
> make[2]: *** [Makefile:1653: rpm.o] Error 1
> make[2]: Leaving directory '/home/users/glen/rpm/BUILD/x86_64-linux/rpm-5.4.15'
> 
> 
> didn't even know rpm5 requires g++  to compile!
> 

Um, rpmqv.cc compilation with g++ has been in place for several (like 5 years? I forget) years to ensure
that *.c and *.cc compiled objects can be freely linked together.

You likely can still compile rpmqv.c as C only with some straight forward Makefile.am patching,
but you’re on your own there: I wish to be able to use C++ on rpm to ensure that rpm includes and libraries
are explicitly tested as C++ ready.

hth

73 de Jeff


> -- 
> glen
> 
> _______________________________________________
> pld-devel-en mailing list
> pld-devel-en at lists.pld-linux.org
> http://lists.pld-linux.org/mailman/listinfo/pld-devel-en



More information about the pld-devel-en mailing list