User avatar
ikey
Project Founder
Posts: 1581
Joined: Sun Jul 27, 2014 10:42 pm
Location: Ireland
Contact: Website

How Do I Compile Stuff On Solus

Tue Jul 04, 2017 3:07 pm

Pinning this as a tutorial to make it easier for newcomers to our forums.

Compiling Normal Things

If you're getting issues with compiling programs from source on Solus, due to missing dependencies, compiler appears broken, etc, make sure
you install the development group! This is much like the "build-essential" package on Debian derived distributions.

Code: Select all

sudo eopkg it -c system.devel

Compiling Kernel Things

If you're building a kernel module, you might get some "not found" errors for the kernel. You'll need system.devel as well as the headers for
your kernel. Assuming you're running the LTS kernel, you'll install them like so:

Code: Select all

sudo eopkg it linux-lts-headers

For Everything Else ..

Most packages in Solus are split up into "nameOfTheThing" and "nameOfTheThing-devel". This -devel subpackage is what you actually need
when you're trying to compile stuff. So for example, if a build is complaining that it cannot find x11.. you'd want libx11-devel.

When in doubt, search!

Code: Select all

eopkg sr x11 --name |grep "\-devel"
Image

brent
Posts: 217
Joined: Tue Apr 11, 2017 2:31 am
Location: desert usa

Re: How Do I Compile Stuff On Solus

Tue Jul 04, 2017 7:05 pm

This is very helpful, thank you. For the sake of clutter, I've always left the devel packages alone, thinking they were file packages for the "developers" or those wishing to build their own gui's or just people doing things way over my head, etc.

Having bullt/compiled/configged some programs (poorly) in Solus terminal, count me as guilty of thinking I was missing stuff while actually having it in SC all along. You shined a flashlight on the dev files for me.

NZnewbie
Posts: 13
Joined: Fri Aug 04, 2017 9:10 pm

Re: How Do I Compile Stuff On Solus

Fri Aug 04, 2017 9:23 pm

Hi, New guy here :) . Im new to Solus and like it but im having trouble setting up my build environment and want to stay on solus and build.

Not sure if this is the right place to ask but here goes. Heres the error. Ive used all the build packages posted previously thread and no go.

https://hastebin.com/uxunewejir.sql


Hope this helps.

Appreciate any assistance

User avatar
kyrios
Posts: 1499
Joined: Thu Sep 22, 2016 4:20 pm

Re: How Do I Compile Stuff On Solus

Fri Aug 04, 2017 9:31 pm

NZnewbie wrote:
Fri Aug 04, 2017 9:23 pm
Hi, New guy here :) . Im new to Solus and like it but im having trouble setting up my build environment and want to stay on solus and build.

Not sure if this is the right place to ask but here goes. Heres the error. Ive used all the build packages posted previously thread and no go.

https://hastebin.com/uxunewejir.sql


Hope this helps.

Appreciate any assistance

Code: Select all

 sudo ln -s /usr/lib64/libncurses.so.5 /usr/lib64/libtinfo.so.5
The libtinfo.so functionality is now built into the libncurses.so shared library. That's why the file does not exists anymore.
The symbolic link resolves the problem for the applications that are still looking for the old library.

NZnewbie
Posts: 13
Joined: Fri Aug 04, 2017 9:10 pm

Re: How Do I Compile Stuff On Solus

Fri Aug 04, 2017 9:34 pm

OH MAN!!!!. Awesome!!!.

Thanks so much!. Looks like it'll clobber so guess it'll build till it errors!.

NZnewbie
Posts: 13
Joined: Fri Aug 04, 2017 9:10 pm

Re: How Do I Compile Stuff On Solus

Fri Aug 04, 2017 9:42 pm

kyrios wrote:
Fri Aug 04, 2017 9:31 pm
NZnewbie wrote:
Fri Aug 04, 2017 9:23 pm
Hi, New guy here :) . Im new to Solus and like it but im having trouble setting up my build environment and want to stay on solus and build.

Not sure if this is the right place to ask but here goes. Heres the error. Ive used all the build packages posted previously thread and no go.

https://hastebin.com/uxunewejir.sql


Hope this helps.

Appreciate any assistance

Code: Select all

 sudo ln -s /usr/lib64/libncurses.so.5 /usr/lib64/libtinfo.so.5
The libtinfo.so functionality is now built into the libncurses.so shared library. That's why the file does not exists anymore.
The symbolic link resolves the problem for the applications that are still looking for the old library.
Next problem--- :shock:


https://hastebin.com/iqifuhuqiz.erl

Cant see any errors to work thru..??

Thanks

NZnewbie
Posts: 13
Joined: Fri Aug 04, 2017 9:10 pm

Re: How Do I Compile Stuff On Solus

Fri Aug 04, 2017 9:44 pm

Ok maybe this...

prebuilts/misc/linux-x86/bison/bison: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

User avatar
kyrios
Posts: 1499
Joined: Thu Sep 22, 2016 4:20 pm

Re: How Do I Compile Stuff On Solus

Fri Aug 04, 2017 10:19 pm

NZnewbie wrote:
Fri Aug 04, 2017 9:44 pm
Ok maybe this...

prebuilts/misc/linux-x86/bison/bison: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
Since libstdc++ is part of the system.base it is present on your system. you can check it with the command "whereis libstdc++.so.6"
So my guess is that your LD_LIBRARY_PATH is not (correctly) set

NZnewbie
Posts: 13
Joined: Fri Aug 04, 2017 9:10 pm

Re: How Do I Compile Stuff On Solus

Fri Aug 04, 2017 10:28 pm

kyrios wrote:
Fri Aug 04, 2017 10:19 pm
NZnewbie wrote:
Fri Aug 04, 2017 9:44 pm
Ok maybe this...

prebuilts/misc/linux-x86/bison/bison: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
Since libstdc++ is part of the system.base it is present on your system. you can check it with the command "whereis libstdc++.so.6"
So my guess is that your LD_LIBRARY_PATH is not (correctly) set

Thanks, Heres the output. libstdc++.so: /usr/lib64/libstdc++.so.6 /usr/lib64/libstdc++.so

NZnewbie
Posts: 13
Joined: Fri Aug 04, 2017 9:10 pm

Re: How Do I Compile Stuff On Solus

Fri Aug 04, 2017 10:43 pm

So IU install android studio- rebooted and tried to build again it built to 5% and failed.

Cant see the forest for the trees!!. Seems diff errors each attempt.


This is the one that im stuck on and never happened on the other os i was using. Cflags??.

FAILED: TARGET_KERNEL_BINARIES
/bin/bash -c "(echo \"Building Kernel\" ) && (make -j16 CFLAGS_MODULE=\"-fno-pic\" -C kernel/oneplus/msm8996 O=/home/cpb/aosip/out/target/product/oneplus3/obj/KERNEL_OBJ ARCH=arm64 CROSS_COMPILE=\" aarch64-linux-android-\" Image.gz-dtb ) && (if grep -q 'CONFIG_OF=y' /home/cpb/aosip/out/target/product/oneplus3/obj/KERNEL_OBJ/.config ; then echo \"Building DTBs\" ; make -j16 CFLAGS_MODULE=\"-fno-pic\" -C kernel/oneplus/msm8996 O=/home/cpb/aosip/out/target/product/oneplus3/obj/KERNEL_OBJ ARCH=arm64 CROSS_COMPILE=\" aarch64-linux-android-\" dtbs ; else echo \"DTBs not enabled\" ; fi ) && (if grep -q 'CONFIG_MODULES=y' /home/cpb/aosip/out/target/product/oneplus3/obj/KERNEL_OBJ/.config ; then echo \"Building Kernel Modules\" ; make -j16 CFLAGS_MODULE=\"-fno-pic\" -C kernel/oneplus/msm8996 O=/home/cpb/aosip/out/target/product/oneplus3/obj/KERNEL_OBJ ARCH=arm64 CROSS_COMPILE=\" aarch64-linux-android-\" modules && make -j16 CFLAGS_MODULE=\"-fno-pic\" -C kernel/oneplus/msm8996 O=/home/cpb/aosip/out/target/product/oneplus3/obj/KERNEL_OBJ INSTALL_MOD_PATH=../../system ARCH=arm64 CROSS_COMPILE=\" aarch64-linux-android-\" modules_install && mdpath=\`find /home/cpb/aosip/out/target/product/oneplus3/system/lib/modules -type f -name modules.order\`; if [ \"\$mdpath\" != \"\" ];then mpath=\`dirname \$mdpath\`; ko=\`find \$mpath/kernel -type f -name *.ko\`; for i in \$ko; do aarch64-linux-android-strip --strip-unneeded \$i; mv \$i /home/cpb/aosip/out/target/product/oneplus3/system/lib/modules/; done; fi && mdpath=\`find /home/cpb/aosip/out/target/product/oneplus3/system/lib/modules -type f -name modules.order\`; if [ \"\$mdpath\" != \"\" ];then mpath=\`dirname \$mdpath\`; rm -rf \$mpath; fi ; else echo \"Kernel Modules not enabled\" ; fi )"
Building Kernel
make: Entering directory '/home/cpb/aosip/kernel/oneplus/msm8996'
make[1]: Entering directory '/home/cpb/aosip/out/target/product/oneplus3/obj/KERNEL_OBJ'

Complete Terminal output:

https://hastebin.com/hapuxajecu.cs

Thanks again for your guidance :)

Return to “Tutorials”