LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-14-2022, 08:33 PM   #1
ernie young
Member
 
Registered: Feb 2016
Distribution: Slackware -current x64 Multilib
Posts: 101

Rep: Reputation: Disabled
-su: patch: command not found


Hello fellow Slackers, I am now using a virtual machine to create packages instead of on my system directly. I started with src2pkg but when I follow https://www.linuxquestions.org/quest...or-4175703841/, I get the following:
Quote:
/usr/src/src2pkg/src2pkg-helpers# patch -p1 < /tmp/src2pkg.patch
-su: patch: command not found
I have admin access, but is it missing something from the installation? Thank you for your time.
 
Old 12-14-2022, 10:10 PM   #2
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,683

Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
After you installed src2pkg did you run...?

Code:
src2pkg --setup
 
Old 12-14-2022, 10:11 PM   #3
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,683

Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
also src2pkg is a fantastic tool, but is there any reason you are not using www.slackbuilds.org?
 
Old 12-14-2022, 10:16 PM   #4
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,683

Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
Also check and make sure you don't have a corrupted patch package. First look for the binary with...

Code:
whereis patch
You can also reinstall the patch package with

Code:
slackpkg reinstall patch
 
Old 12-15-2022, 04:10 AM   #5
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
I would use "command -v":
Code:
didier[~]$ command -v patch
/usr/bin/patch
command is specified by POSIX.
 
1 members found this post helpful.
Old 12-15-2022, 06:33 PM   #6
ernie young
Member
 
Registered: Feb 2016
Distribution: Slackware -current x64 Multilib
Posts: 101

Original Poster
Rep: Reputation: Disabled
Many good questions Daedra.

1) Because of the output of running src2pkg --setup and not figuring out where to go after this I opened the thread.
Code:
# src2pkg --setup
Notice - Creating src2pkg-helpers:
src2pkg uses a shared library and a few programs
when creating packages. For best compatibility,
these binaries will be compiled on your system.
They are then installed in a private directory.
When done, src2pkg is ready for use.

TEMP_DIR=/usr/src/src2pkg/builds/src2pkg-helpers
Starting build in 5 seconds
/usr/libexec/src2pkg/01-pre_process: line 789: gcc: command not found
/usr/libexec/src2pkg/01-pre_process: line 918: gcc: command not found
Unpacking sources - OK
Creating libsentry - Ooops! Can't live without it...
2) I usually use slackbuilds but to update packages already on slackbuilds.org, however the source code has been provided for the package I am trying to build. I am still learning these aspects of Slackware. I tried in the past building from source and have failed, so every couple of years I find myself revisiting this.

3) I didn't have patch installed, but I have installed it now. I ran the following as a result:
Code:
/usr/src/src2pkg/src2pkg-helper# patch -p1 < /tmp/src2pkg.patch
patching file src2pkg.setup
patching file libsentry-0.7.2_glibc-2.23.patch
4)Now that I have installed patch, I get the correct output instead of nothing:
Code:
# command -v patch
/usr/bin/patch
Thanks for that command Didier Spaier. Never a dull moment with Slackware.

I reran src2pkg --setup but failed again with a slight change:
Code:
# src2pkg --setup
Notice - Creating src2pkg-helpers:
src2pkg uses a shared library and a few programs
when creating packages. For best compatibility,
these binaries will be compiled on your system.
They are then installed in a private directory.
When done, src2pkg is ready for use.

TEMP_DIR=/usr/src/src2pkg/builds/src2pkg-helpers
Starting build in 5 seconds
/usr/libexec/src2pkg/01-pre_process: line 789: gcc: command not found
/usr/libexec/src2pkg/01-pre_process: line 918: gcc: command not found
Unpacking sources - OK
patching file libsentry.c
Creating libsentry - Ooops! Can't live without it...
I can continue to use src2pkg but I am also open to finding ways that can better help me. Thank you both for the help and patience!
 
Old 12-16-2022, 12:45 AM   #7
henca
Member
 
Registered: Aug 2007
Location: Linköping, Sweden
Distribution: Slackware
Posts: 958

Rep: Reputation: 648Reputation: 648Reputation: 648Reputation: 648Reputation: 648Reputation: 648
Quote:
Originally Posted by ernie young View Post
I have admin access, but is it missing something from the installation?
Yes, it seems as if your installation is missing a lot. You have already found out that you need the patch utility. Now you are suffering from the lack of the gcc compiler.

You will not be able to compile any program from source without a compiler.

Basically all slackbuild scripts from slackbuilds.org and other sources assume that you have a full install of Slackware. Trying to be smart and skip some packages during installation usually sooner or later will backfire on you.

In the mid 90s when I did my first Slackware installation I patiently answered questions about every package and carefully thought about what was really necessary. Among those packages there was something called "groff" which was some kind of text formatting program. I thought that I wouldn't be doing any text processing, the machine was intended for software development so I skipped that package. It later turned out that I was unable to read any man-pages on that machine...

Since then I have always done full Slackware installations, that is also the recommended way to install Slackware.

regards Henrik
 
1 members found this post helpful.
Old 12-16-2022, 09:16 AM   #8
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,683

Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
I agree with henca, my instincts are telling me something is wrong with your installation. If possible, I would reinstall Slackaware and make sure you do a full install of all packages.
 
1 members found this post helpful.
Old 12-16-2022, 11:34 PM   #9
ernie young
Member
 
Registered: Feb 2016
Distribution: Slackware -current x64 Multilib
Posts: 101

Original Poster
Rep: Reputation: Disabled
I mentioned on my first post that I was installing it on my virtual machine, and I reinstalled the OS 3 times because I was finding basic programs missing. I thought I had nailed it on the third time. I'll get a new copy and verify the md5sum and report back. Thank you both!
 
Old 12-17-2022, 10:01 PM   #10
ernie young
Member
 
Registered: Feb 2016
Distribution: Slackware -current x64 Multilib
Posts: 101

Original Poster
Rep: Reputation: Disabled
The new installation from a new image seems to be working. I was able to install src2pkg!
I tried making the package but failed.
Code:
Found 'cmake' configuration - Configuring using:
   cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=Release -DLOCALSTATE_INSTALL_DIR=/var -DSYSCONF_INSTALL_DIR=/etc
Skipping compile_source - 
FAILED!! No INSTALL_LINE given.
I also tried using a slackbuild but also failed with the error,
Code:
autoreconf: export WARNINGS=
autoreconf: error: 'configure.ac' is required
I have read a few documents on how to compile from Source but I haven't yet figured out how to overcome the obstacles. I haven't being able to get it. If someone knows of something simple but with great explanations on how to learn this, I would appreciate it.
 
Old 12-18-2022, 02:58 AM   #11
Tonus
Senior Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-15.0
Posts: 1,405
Blog Entries: 3

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
Hi,

Are you using multilib, and if so how did you install it ?

You've got good advices on how to use slackbuilds on slackbuilds.org and some others in the Slackware documentation (see pined post).
 
Old 12-18-2022, 09:43 AM   #12
ernie young
Member
 
Registered: Feb 2016
Distribution: Slackware -current x64 Multilib
Posts: 101

Original Poster
Rep: Reputation: Disabled
Hello Tonus, on the machine where I tried this, it does have multilib.

I recently created a virtual machine slackware for testing without multilib but now that you mention it, I am going to install multilib on it, too.
 
Old 12-18-2022, 03:52 PM   #13
Tonus
Senior Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-15.0
Posts: 1,405
Blog Entries: 3

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
Unhappy

I believe you'll have to investigate how to deal with compilation under multilib : how to compile for x86_64 and how to get a real 32bits env.

I guess your difficulties come from the confusion that is made from cohabitation.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] No package 'x11' found No package 'xext' found No package 'xdamage' found No package 'xfixes' found No package 'x11-xcb' found Jigsaw Linux From Scratch 14 02-23-2021 08:35 PM
[SOLVED] complete noob question. "command not found" "command not found" jeanlucpicard Linux - Newbie 4 08-27-2013 02:14 AM
Directory not found; -xzvf not found; Makefile not found RealGomer Linux - Software 4 09-20-2010 10:02 AM
bash: rpm: command not found && sudo: alien: command not found Java_Code Ubuntu 7 07-27-2006 11:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration