$PATH and 'make' --- (scratching that bald spot again)

I’m trying to use ‘make’ , & subsequently a couple of other commands.

While in the directory that holds the Makefile I get this error

bill@linux-xanx:~/DIRECTORY> make
/bin/sh: bc: command not found
/bin/sh: cc: command not found
make CFLAGS_FLOAT="-mhard-float -mfloat-abi=hard" V=1 ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.12.14-lp151.27-default/build M=/home/bill/DIRECTORY  modules
make[1]: *** /lib/modules/4.12.14-lp151.27-default/build: No such file or directory.  Stop.
make: *** [Makefile:1908: modules] Error 2

‘make’ is in /usr/bin

‘Makefile’ is in DIRECTORY

my PATH IS:

bill@linux-xanx:~/DIRECTORY> echo $PATH
/home/bill/bin:/usr/local/bin:/usr/bin:/bin:/usr/lib/mit/sbin

I thought the ‘make’ command automatically looked for a ‘Makefile’ in the active directory if a file is not specified.
Do I need to add to the PATH to get ‘make’ started?

forgot this

bill@linux-xanx:~> cnf make
                       
Program 'make' is present in package 'make', which is installed on your system.

Absolute path to 'make' is '/usr/bin/make'. Please check your $PATH variable to see whether it contains the mentioned path.


It looks to me that it has found “Makefile” and is reporting errors while trying to run that “Makefile”.

You probably need to install the development base pattern, and to install the kernel-devel pattern before this can work.

Hi
The errors explain it all;


/bin/sh: bc: command not found
/bin/sh: cc: command not found

In this case bc (zypper in bc) and cc which is the compiler, in your case gcc (zypper in gcc)…

Or…


cnf bc
                    
Program 'bc' is present in package 'bc', which is installed on your system.

Absolute path to 'bc' is '/usr/bin/bc'. Please check your $PATH variable to see whether it contains the mentioned path.

cnf cc
                    
Program 'cc' is present in package 'gcc', which is installed on your system.

Absolute path to 'cc' is '/usr/bin/cc'. Please check your $PATH variable to see whether it contains the mentioned path.

I had already put in bc and gcc-c and I thought cc, but the outputs below show cc not found.

And the error is down to this:

make CFLAGS_FLOAT="-mhard-float -mfloat-abi=hard" V=1 ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.12.14-lp151.28.4-default/build M=/home/bill/rtl8821cu  modules
make[1]: *** /lib/modules/4.12.14-lp151.28.4-default/build: No such file or directory.  Stop.
make: *** [Makefile:1908: modules] Error 2
**linux-xanx:~ #** zypper in bc
Loading repository data...
Reading installed packages...
'bc' is already installed.
No update candidate for 'bc-1.07.1-lp151.3.11.x86_64'. The highest available version is already installed.
Resolving package dependencies...

Nothing to do.
**-xanx:~ #** zypper in cc
Loading repository data...
Reading installed packages...
'cc' not found in package names. Trying capabilities.
No provider of 'cc' found.
**linux-xanx:~ #** zypper in gcc
Loading repository data...
Reading installed packages...
'gcc' is already installed.
No update candidate for 'gcc-7-lp151.3.5.x86_64'. The highest available version is already installed.
Resolving package dependencies...

Nothing to do.

I am studying on nrickerts comments, but time to do some more work on it later.
Thanks guys!

Hi
Again, the error explains the problem…


make[1]: *** /lib/modules/4.12.14-lp151.28.4-default/build: No such file or directory.  Stop.

So you trying to build a kernel module… the make file needs tweaking (so the -C points at a location owned by your user)… or build as an rpm… even easier…

A bit more detail. In Yast Software Management, you can select the “Patterns” view. (Click on “View” near top left).

In the “Patterns” view, scroll down to the “Development” section. Install the “Base Development” pattern.

Otherwise you will make a little progress, then get to the next error. That base development pattern will bring in all of the tools that you are likely to need. And then install the “kernel-devel” package which brings in header files that you might need.

As usual, my post threads get longer - not shorter.
The thing I am trying to install are the drivers for the Realtek rtl8811cu WiFi dongle discussed in another thread.
The dongle is for my wife’s laptop(The onboard WiFi seems to be glitchy from time to time) and I thought I would give it a try.
MISTAKE! Way over my head. Too old for these kind of new tricks!

I will probably take malcolmlewis’s original suggestion and just buy her one the works OTB, Just need to find a good one that doesn’t have an antenna.

Again thanks guys, I may give this another shot when I have a lot of time to delve deeper.

PS> all not for naught! I still learn things when I come here and ask questions.

So, I think I will go take a look at creating an rpm for 3 reasons:
1 - the learning experience
2- I don’t want to add a bunch of stuff to my wife’s laptop that she will never us, not never see.
3- I don’t really have that much to keep my mind busy.

But, I am looking at OTB ac WiFi adapters for her.

No, it does not. What it needs is matching version of kernel-default-devel.

FYI -
https://github.com/axiomware/RTL8821CU_driver_v5.4.1

Describes how to verify the driver already exists on your system.
If it’s not on your system, then provides instructions for building on a Debian system but likely can be adapted to building on an RPM system like openSUSE (I didn’t look hard for RPM specific instructions, maybe it exists). As described in this thread, install the C base development pattern, or keep running make attempts and installing dependencies as you run into them when missing.

TSU

I downloaded a zip from malcolmlewis in another thread, unzipped it and turned the results into a .tar.gz file.

I have made an attempt to do .rpm from it, but am kind of leary of pulling the trigger to complete the rpm.

Hi
You could ask user Sauerland if it could be built as a rpm :wink: