On Sun, Jan 24, 2016 at 12:33:30AM +0100, Sven Hartge wrote: > Um 14:49 Uhr am 23.01.16 schrieb Julian Andres Klode: > > > > > > > https://github.com/julian-klode/apt/compare/master...julian-klode:bugfix/remap-stringview > > > > I cannot reproduce the issue locally though, so I might have missed > > something. If you still can, it would be great if you could build > > libapt-pkg5.0 from that and see if you can reproduce it or if it works > > now. > > I got the diff from git > https://anonscm.debian.org/cgit/apt/apt.git/diff/?id=7dd0c2e > and tried to build apt in a Sid chroot with cowbuilder, but the build fails > with the > following messages: > > Compiling pkgcachegen.cc to ../build/obj/apt-pkg/pkgcachegen.opic > g++ -c -MD -Wdate-time -D_FORTIFY_SOURCE=2 -Wdate-time -D_FORTIFY_SOURCE=2 > -DHAVE_CONFIG_H -D_REENTRANT -D_FORTIFY_SOURCE=2 -I../build/include > -DAPT_DOMAIN='"libapt-pkg5.0"' -std=c++11 -g -O2 -fPIE > -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fPIE > -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wextra > -Wcast-align -Wlogical-op -Wredundant-decls -Wmissing-declarations > -Wunsafe-loop-optimizations -Wctor-dtor-privacy -Wdisabled-optimization > -Winit-self -Wmissing-include-dirs -Wnoexcept -Wsign-promo -Wundef > -DAPT_PKG_EXPOSE_STRING_VIEW -fPIC -DPIC -o > ../build/obj/apt-pkg/pkgcachegen.opic > '/build/apt-1.2.0~sh.1/apt-pkg/pkgcachegen.cc' > In file included from ../build/include/apt-pkg/pkgcachegen.h:23:0, > from /build/apt-1.2.0~sh.1/apt-pkg/pkgcachegen.cc:15: > ../build/include/apt-pkg/pkgcache.h: In member function 'APT::StringView > pkgCache::ViewString(map_stringitem_t) const': > ../build/include/apt-pkg/pkgcache.h:252:80: warning: cast from 'char*' to > 'const uint16_t* {aka const short unsigned int*}' increases required > alignment of target type [-Wcast-align] > uint16_t len = *reinterpret_cast<const uint16_t*>(name - > sizeof(uint16_t)); > > ^ > /build/apt-1.2.0~sh.1/apt-pkg/pkgcachegen.cc: In member function 'void > pkgCacheGenerator::ReMap(const void*, const void*)': > /build/apt-1.2.0~sh.1/apt-pkg/pkgcachegen.cc:183:57: error: 'oldSize' was not > declared in this scope > || ViewP->data() > static_cast<const char*>(oldMap) + oldSize)
Yes, that's to be expected. I introduced this in the commit before. Gotta keep those commits logically separated :) https://anonscm.debian.org/cgit/apt/apt.git/commit/?id=19819ac58a420275e0ae9aa7e2a34c72cba8af5e -- Julian Andres Klode - Debian Developer, Ubuntu Member See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/. When replying, only quote what is necessary, and write each reply directly below the part(s) it pertains to (`inline'). Thank you.