Compiling module from source - make gives error

Post here if you are a new Porteus member and you're looking for some help.
hope
Black ninja
Black ninja
Posts: 64
Joined: 04 Jul 2020, 12:07
Distribution: porteus 5.0rc1 KDE desktop

Compiling module from source - make gives error

Post#1 by hope » 27 Aug 2022, 23:50

I have read :

http://www.porteus.org/tutorials/51-dev ... ernel.html

and

http://www.porteus.org/tutorials/9-modu ... ource.html

I downloaded and activated 05-devel.xzm module and even 000-kernel.xzm packages. But when I try to compile a package from its source I am using

Code: Select all

./configure --prefix=/usr 
it gives :
# ./configure --prefix=/usr
bash: ./configure: No such file or directory
When I also try to use make it gives :
$ make
make: error while loading shared libraries: libguile-2.2.so.1: cannot open shared object file: No such file or directory
error. According to https://forums.unraid.net/topic/89380-m ... ng-errors/ I tried to install that package for slackware 14.2 from https://packages.slackware.com/?r=slack ... 6_64-2.txz

but nothing changed. :pardon: What am I doing wrong? Thanks.
Newbie to Linux-Unix systems, try to read,learn, apply, modify and create.

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3941
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

Compiling module from source - make gives error

Post#2 by ncmprhnsbl » 28 Aug 2022, 01:22

what are you trying to compile?
are you running ./configure from the source directory? does the file 'configure' exist there?
i would guess you need guile 2.2 :
https://slakfinder.org/sbomt64-15.0/dev ... 4-2smt.txz
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

hope
Black ninja
Black ninja
Posts: 64
Joined: 04 Jul 2020, 12:07
Distribution: porteus 5.0rc1 KDE desktop

Compiling module from source - make gives error

Post#3 by hope » 28 Aug 2022, 09:05

Thanks ncmprhnsbl for reply.

Oh, you are right, I had to install guile2.2 instead 2.0, it is my fault. Thanks.

I am trying to compile ufw-0.36 package. I am trying to compile from its source directory but there is no configure file there. I have read the README file from the package it says :
Install
-------
Users can install with:
# python ./setup.py install
$ python ./setup.py install --home=PREFIX

The interpreter used for setup.py is the one used for ufw. So if your system
python is 2.6, but you have python2.7 available, use something like:
$ python2.7 ./setup.py install --home=PREFIX

Distributions which install to a build directory for packaging can install
with:
$ python ./setup.py install --root=PREFIX
...
I checked that starndard distro have all required packages including python3.8.
I tried :

Code: Select all

$ python ./setup.py install --home=PREFIX
but since there is no ./setup.py file on the source directory, it gives error that it could not find setup.py.

I installed libguile2.2 package you have sent in link. I downloaded it and convert it to xzm by using :

Code: Select all

$ txz2xzm guile2.2-2.2.6-x86_64-2smt.txz
and get xzm module and activate it. There is a Makefile in source directory of ufw-0.36. I tried to install again :
[Edited : ]

Code: Select all

make Makefile
it gives the same error : $ make
make: /lib64/libc.so.6: version `GLIBC_2.33' not found (required by /usr/lib64/libguile-2.2.so.1)
make: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by /usr/lib64/libguile-2.2.so.1)
[/code]
but there is no such file in my system.

A minute ago I found https://slack.conraid.net/repository/sl ... 64-3cf.txz and download the package and converted it to xzm and activated it(Actually I used upgradepkg command too but nothing changed).Then try to use it :

Code: Select all

$ sudo ufw
Password: 
Traceback (most recent call last):
  File "/usr/sbin/ufw", line 25, in <module>
    import ufw.frontend
ModuleNotFoundError: No module named 'ufw'
New error added to error chain ! Is there any way to install ufw to Porteus? :unknown: Thanks.
Last edited by hope on 28 Aug 2022, 09:28, edited 1 time in total.
Newbie to Linux-Unix systems, try to read,learn, apply, modify and create.

hope
Black ninja
Black ninja
Posts: 64
Joined: 04 Jul 2020, 12:07
Distribution: porteus 5.0rc1 KDE desktop

Compiling module from source - make gives error

Post#4 by hope » 28 Aug 2022, 09:19

Actually, I want to learn how to make/install packages from their sources. I need not to learn how to cook a fish but catch it. :Search: Thanks again.
Newbie to Linux-Unix systems, try to read,learn, apply, modify and create.

beny
Full of knowledge
Full of knowledge
Posts: 2098
Joined: 02 Jan 2011, 11:33
Location: italy

Compiling module from source - make gives error

Post#5 by beny » 28 Aug 2022, 09:47

hi hope you have downloaded a package for slackware current not slack15 the repository that you have choose is for slackware current:take a look at this link: and if you want a package, slackfinder is the answer the sbomt packages are build from the source code via slackbuild and you can trust it.
https://slakfinder.org/index.php?act=se ... e=#results

hope
Black ninja
Black ninja
Posts: 64
Joined: 04 Jul 2020, 12:07
Distribution: porteus 5.0rc1 KDE desktop

Compiling module from source - make gives error

Post#6 by hope » 28 Aug 2022, 10:49

Hi beny, Thanks for reply,the site you supplied is very useful for me, from now on I will use it.

I got ufw sbomt package for slackware 15, extract it and it extracts all files to its corresponding folders like /usr/sbin, /lib ,/etc etc. But in final, wen I tried to run ufw it says again :

Code: Select all

$ sudo ufw
Password: 
Traceback (most recent call last):
  File "/usr/sbin/ufw", line 25, in <module>
    import ufw.frontend
ModuleNotFoundError: No module named 'ufw'
error.
:hammer:
[ufw ]
Newbie to Linux-Unix systems, try to read,learn, apply, modify and create.

hope
Black ninja
Black ninja
Posts: 64
Joined: 04 Jul 2020, 12:07
Distribution: porteus 5.0rc1 KDE desktop

Compiling module from source - make gives error

Post#7 by hope » 28 Aug 2022, 10:53

Btw, I solved make: /lib64/libc.so.6: version `GLIBC_2.33' not found (required by /usr/lib64/libguile-2.2.so.1) error by installing glibc-2.33 package and it disappered, I want to share that, finally I am able to use make without any errors.
Newbie to Linux-Unix systems, try to read,learn, apply, modify and create.

beny
Full of knowledge
Full of knowledge
Posts: 2098
Joined: 02 Jan 2011, 11:33
Location: italy

Compiling module from source - make gives error

Post#8 by beny » 28 Aug 2022, 11:37

hi hope with the txz packages you have to use txz2xzm -x /home/guest/Downloads/ufw-0.36-x86_64-1smt.txz and the script make for you a xzm packages that you have in /tmp after this you put the xzm into the modules directory and activate it or reboot to have it on system

hope
Black ninja
Black ninja
Posts: 64
Joined: 04 Jul 2020, 12:07
Distribution: porteus 5.0rc1 KDE desktop

Compiling module from source - make gives error

Post#9 by hope » 28 Aug 2022, 12:12

beny wrote:
28 Aug 2022, 11:37
hi hope with the txz packages you have to use txz2xzm -x /home/guest/Downloads/ufw-0.36-x86_64-1smt.txz and the script make for you a xzm packages that you have in /tmp after this you put the xzm into the modules directory and activate it or reboot to have it on system
Thanks beny, I did what you said exactly but same error.
Newbie to Linux-Unix systems, try to read,learn, apply, modify and create.

beny
Full of knowledge
Full of knowledge
Posts: 2098
Joined: 02 Jan 2011, 11:33
Location: italy

Compiling module from source - make gives error

Post#10 by beny » 28 Aug 2022, 12:30

hi hope i have only make the package and run

Code: Select all

  guest@porteus:~$ sudo ufw --help

Usage: ufw COMMAND

Commands:
 enable                          enables the firewall
 disable                         disables the firewall
 default ARG                     set default policy
 logging LEVEL                   set logging to LEVEL
 allow ARGS                      add allow rule
 deny ARGS                       add deny rule
 reject ARGS                     add reject rule
 limit ARGS                      add limit rule
 delete RULE|NUM                 delete RULE
 insert NUM RULE                 insert RULE at NUM
 route RULE                      add route RULE
 route delete RULE|NUM           delete route RULE
 route insert NUM RULE           insert route RULE at NUM
 reload                          reload firewall
 reset                           reset firewall
 status                          show firewall status
 status numbered                 show firewall status as numbered list of RULES
 status verbose                  show verbose firewall status
 show ARG                        show firewall report
 version                         display version information

Application profile commands:
 app list                        list application profiles
 app info PROFILE                show information on PROFILE
 app update PROFILE              update PROFILE
 app default ARG                 set default application policy

guest@porteus:~$ 

                                            

hope
Black ninja
Black ninja
Posts: 64
Joined: 04 Jul 2020, 12:07
Distribution: porteus 5.0rc1 KDE desktop

Compiling module from source - make gives error

Post#11 by hope » 28 Aug 2022, 13:29

Hi beny, I found that it is a wrong python version problem between ufw package compiled and my the system had. I do not know it is the same one but in here https://bugs.launchpad.net/ubuntu/+sour ... bug/337705 it looks like a problem , although it said solved, I have that ! Thanks.
Newbie to Linux-Unix systems, try to read,learn, apply, modify and create.

hope
Black ninja
Black ninja
Posts: 64
Joined: 04 Jul 2020, 12:07
Distribution: porteus 5.0rc1 KDE desktop

Compiling module from source - make gives error

Post#12 by hope » 28 Aug 2022, 15:07

beny, can I ask a question if you do not mind ; what is your python and slackware version you are using? Because I could not managed to work ufw still although I did what you have said. Mines are :

Code: Select all

# cat /etc/slackware-version 
Slackware 14.2+

# uname -a
Linux 5.4.57-porteus #1 SMP Sun Aug 9 09:03:28 UTC 2020 x86_64 (short version)

# ls -l /var/log/packages/ | grep -i pytho
-rw-r--r-- 1 root root 520919 Aug  7  2020 python3-3.8.5-x86_64-1
Thanks.
Newbie to Linux-Unix systems, try to read,learn, apply, modify and create.

beny
Full of knowledge
Full of knowledge
Posts: 2098
Joined: 02 Jan 2011, 11:33
Location: italy

Compiling module from source - make gives error

Post#13 by beny » 28 Aug 2022, 15:49

hi hope for your task is better to upgrade to porteus v5 that is based on slackware 15:
guest@porteus:~$ cat /etc/slackware-version
Slackware 15.0
guest@porteus:~$ uname -a
Linux porteus.example.net 5.18.8-porteus #1 SMP PREEMPT_DYNAMIC Sat Jul 2 10:05:31 MSK 2022 x86_64 AMD FX(tm)-6300 Six-Core Processor AuthenticAMD GNU/Linux
guest@porteus:~$ ls -l /var/log/packages/ | grep -i pytho
-rw-r--r-- 1 root root 26514 Jun 30 07:14 python-setuptools-57.5.0-x86_64-2
-rw-r--r-- 1 root root 7723 Jun 30 07:06 python-urllib3-1.26.8-x86_64-1
-rw-r--r-- 1 root root 540729 Jun 30 07:06 python3-3.9.12-x86_64-1_slack15.0
-rw-r--r-- 1 root root 1730 Jun 30 07:14 python3-pythondialog-3.5.3-x86_64-1_ncm
guest@porteus:~$
i suppose you have cleaned the files that you have put manually before make the ufw package or you have a changes module activated,the upgrade is only a hint but for the use of make you have the gcc and the llvm too old.

hope
Black ninja
Black ninja
Posts: 64
Joined: 04 Jul 2020, 12:07
Distribution: porteus 5.0rc1 KDE desktop

Compiling module from source - make gives error

Post#14 by hope » 28 Aug 2022, 17:10

beny, thanks for info, maybe you are right! Time is coming to upgrade my Porteus :)
I reboot since I am using always fresh option. I put ufw module in modules folder and restarted, although module was there, nothing happened, not loaded at startup... strange !
Oh, your hint is very useful too, because I noticed that I do not have gcc or llvm packages :D
Newbie to Linux-Unix systems, try to read,learn, apply, modify and create.

beny
Full of knowledge
Full of knowledge
Posts: 2098
Joined: 02 Jan 2011, 11:33
Location: italy

Compiling module from source - make gives error

Post#15 by beny » 28 Aug 2022, 17:41

hi hope try this link that is for 14.2 maybe work for you :
https://slakfinder.org/index.php?act=se ... e=#results

Post Reply