rpm & c++ (via java binding)

Jakub Bogusz qboosh at pld-linux.org
Sun Jun 25 15:32:20 CEST 2017


On Sun, Jun 25, 2017 at 02:38:20PM +0300, Elan Ruusamäe wrote:
> yuk. how this should be fixed?
> 
> full build log available here:
> http://buildlogs.pld-linux.org//index.php?dist=th&arch=x86_64&ok=0&name=rpm&id=6b359a44-4012-40a8-a9da-199ee4e72696&action=tail
> 
> 
> libtool: compile:  x86_64-pld-linux-g++ -DHAVE_CONFIG_H -I. -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=040139 
> -I/usr/include/db5.2 -I/usr/include/ossp-uuid -I/usr/include/ossp-uuid 
> -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 -MT rpmjni.lo 
> -MD -MP -MF .deps/rpmjni.Tpo -c rpmjni.cc  -fPIC -DPIC -o .libs/rpmjni.o
> In file included from /usr/include/c++/6.3.0/stdlib.h:36:0,
>                  from ../system.h:196,
>                  from rpmjni.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 rpmjni.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:2146: rpmjni.lo] Error 1

rpm 5.4.15 or 5.4.16 + glibc >= 2.17?

Old rpm's system.h defines getenv macro before including <stdlib.h>, this
probably breaks getenv() prototypes declared in this header.

rpm 5.4.17 includes <stdlib.h> before redefining getenv to
secure_getenv.


-- 
Jakub Bogusz    http://qboosh.pl/


More information about the pld-devel-en mailing list