question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Doesn't compile on Solus OS

See original GitHub issue

Installed capstone from the Git repo, tried to run make in the sandsifter folder and got these error messages :

cc -g2 -O3 -pipe -fPIC -Wformat -Wformat-security -fno-omit-frame-pointer -fexceptions -D_FORTIFY_SOURCE=2 -fstack-protector --param ssp-buffer-size=32 -fasynchronous-unwind-tables -ftree-vectorize -feliminate-unused-debug-types -Wall -Wno-error -Wp,-D_REENTRANT -c injector.c -o injector.o -Wall
injector.c:321:93: warning: excess elements in array initializer
  .start={.bytes={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, .len=0},
                                                                                             ^~~~
injector.c:321:93: note: (near initialization for ‘total_range.start.bytes’)
injector.c:322:91: warning: excess elements in array initializer
  .end={.bytes={0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}, .len=0},
                                                                                           ^~~~
injector.c:322:91: note: (near initialization for ‘total_range.end.bytes’)
injector.c: In function ‘inject’:
injector.c:778:2: warning: asm operand 15 probably doesn’t match constraints
  __asm__ __volatile__ ("\
  ^~~~~~~
injector.c:778:2: error: impossible constraint in ‘asm’
injector.c: In function ‘main’:
injector.c:1508:5: warning: ‘pid’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  if (pid!=0) {
     ^
injector.c:1503:3: warning: ‘null_p’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   munmap(null_p, PAGE_SIZE);
   ^~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:38: injector.o] Error 1

Running make version 4.2.1 and CC version 6.4.0

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:8

github_iconTop GitHub Comments

3reactions
jotebecommented, Nov 1, 2017

@MoochMcGee there is an AUR package for sandsifter. https://aur.archlinux.org/packages/sandsifter-git/

for those not on arch, it compiles with -no-pie as an option.

0reactions
lanodancommented, Nov 4, 2017

Looks like -no-pie is unsupported here.

$ make CC=gcc CFLAGS='-no-pie'
gcc -no-pie -c injector.c -o injector.o -Wall
gcc: error: unrecognized command line option ‘-no-pie’
make: *** [Makefile:38: injector.o] Error 1
$ make CC=clang CFLAGS='-no-pie'
clang -no-pie -c injector.c -o injector.o -Wall
clang-4.0: error: unknown argument: '-no-pie'
make: *** [Makefile:38: injector.o] Error 1
$ gcc --version
gcc (Gentoo Hardened 5.4.0-r3 p1.3, pie-0.6.5) 5.4.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ clang --version
clang version 4.0.1 (tags/RELEASE_401/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

(I’m installing the 5.x branch of Clang/LLVM to see if I’ll be fixed)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Compiling Software - Solus Forum
I just need to compile my own stuff so I can use my software, or any other software I want to use which...
Read more >
How can i compile software from source on solus ... - Reddit
Make a package request first. ... This gets you a compiler and other tools needed for compilation. Then, download the source code. Read...
Read more >
Unable to install in solus os. · Issue #11 · mmstick/fontfinder
I have recently switched my daily OS from Fedora to Solus. ... so I decided to install it on Solus too, which does...
Read more >
Setting Up Solus for Software Development - Field Notes
You can add the bin directory to your PATH to be able to run the compiled programs by typing their names. You may...
Read more >
Wine On Solus Not Working - Unix & Linux Stack Exchange
WINE doesn't provide any application launchers by itself. You must run other programs through wine, i.e. via the command line or double ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found