Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error for CC=cc ./build-rr.sh hw #122

Open
Ulrar opened this issue Apr 16, 2018 · 3 comments
Open

Compile error for CC=cc ./build-rr.sh hw #122

Ulrar opened this issue Apr 16, 2018 · 3 comments

Comments

@Ulrar
Copy link

Ulrar commented Apr 16, 2018

Hi,

I'm trying to compile rumprun on debian 9 (in docker, if that matters at all), but I get this :

$ CC=cc ./build-rr.sh hw >/dev/null
In file included from /builds/hosting/flex/unikernel-haproxy/rumprun/src-netbsd/sys/lib/libunwind/UnwindCursor.hpp:19:0,
                 from /builds/hosting/flex/unikernel-haproxy/rumprun/src-netbsd/sys/lib/libunwind/libunwind.cxx:18:
/builds/hosting/flex/unikernel-haproxy/rumprun/src-netbsd/sys/lib/libunwind/AddressSpace.hpp: In member function '__int64_t _Unwind::LocalAddressSpace::getSLEB128(_Unwind::LocalAddressSpace::pint_t&, _Unwind::LocalAddressSpace::pint_t)':
/builds/hosting/flex/unikernel-haproxy/rumprun/src-netbsd/sys/lib/libunwind/AddressSpace.hpp:143:27: error: left shift of negative value [-Werror=shift-negative-value]
       result |= (-1LL) << bit;
                           ^~~
cc1plus: all warnings being treated as errors

*** Failed target:  libunwind.o
*** Failed command: /builds/hosting/flex/unikernel-haproxy/rumprun/obj-amd64-hw/rumptools/bin/x86_64--netbsd-c++ -frandom-seed=1cdedddb -O2 -g -mno-red-zone -Wall -Wextra -Wno-unused-parameter -fno-stack-protector -Werror -D__NetBSD__ -Ulinux -U__linux -U__linux__ -U__gnu_linux__ --sysroot=/builds/hosting/flex/unikernel-haproxy/rumprun/obj-amd64-hw/rumptools/dest -isystem =/usr/include -isystem /builds/hosting/flex/unikernel-haproxy/rumprun/obj-amd64-hw/rumptools/dest/usr/include/c++ -I/builds/hosting/flex/unikernel-haproxy/rumprun/./obj-amd64-hw/include -c -std=c++0x -funwind-tables -fno-rtti -fno-exceptions -fvisibility=hidden -Wno-old-style-cast -I/builds/hosting/flex/unikernel-haproxy/rumprun/src-netbsd/sys/lib/libunwind /builds/hosting/flex/unikernel-haproxy/rumprun/src-netbsd/sys/lib/libunwind/libunwind.cxx -o libunwind.o

*** Failed target:  dependall
*** Failed command: cd "/builds/hosting/flex/unikernel-haproxy/rumprun/lib/libunwind"; /builds/hosting/flex/unikernel-haproxy/rumprun/obj-amd64-hw/rumptools/bin/nbmake realall
make: *** [/builds/hosting/flex/unikernel-haproxy/rumprun/./obj-amd64-hw/lib/libunwind/libunwind.a] Error 1
@krytarowski
Copy link

This has been fixed in NetBSD-current:

----------------------------
revision 1.9
date: 2017-11-02 17:09:33 +0100;  author: christos;  state: Exp;  lines: +1 -1;  commitid: suMAMGeR2HNDKtdA;
Avoid negative shift.
----------------------------

@MHassanNadeem
Copy link

@Jksun88
Copy link

Jksun88 commented Nov 26, 2019

Just want to mention that the file to edit is in the directory where you clone rumprun. For example for me it was:

  1. /rumprun/src-netbsd/sys/lib/libunwind
  2. gedit AddressSpace.hpp (you can any editor that you want, I used gedit to see the lines number)
  3. Then change the line number 143 as @christos mentionned here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants