make default options / symlink?

6 replies [Last post]
Aries97
Offline
Joined: 06/18/2011

I'm trying to compile a driver for my RAID card, an Areca-1880ix. I've downloaded the source, installed gcc, and make from synaptec package manager. However when I enter the directory with the now uncompressed source and run make I get:

make -C /lib/modules/2.6.35-28-generic/build SUBDIRS=/home/sy/src/arcmsr.1.20.0X.15-110330 BUILD_INI=m
make: *** /lib/modules/2.6.35-28-generic/build: No such file or directory. Stop.
make: *** [all] Error 2

So just messing around I tried:
sy@Red:~/src/arcmsr.1.20.0X.15-110330$ make -C ~/src/arcmsr.1.20.0X.15-110330/
make: Entering directory `/home/sy/src/arcmsr.1.20.0X.15-110330'
make -C /lib/modules/2.6.35-28-generic/build SUBDIRS=/home/sy/src/arcmsr.1.20.0X.15-110330 BUILD_INI=m
make: Entering an unknown directory
make: *** /lib/modules/2.6.35-28-generic/build: No such file or directory. Stop.
make: Leaving an unknown directory
make: *** [all] Error 2
make: Leaving directory `/home/sy/src/arcmsr.1.20.0X.15-110330'

Somehow the "-C /lib/modules/2.6.35-28-generic/build SUBDIRS=/home/sy/src/arcmsr.1.20.0X.15-110330 BUILD_INI=m" is getting added on to the make command; and I don't know how to get that behavior to stop.

Any ideas?

ruben
Offline
Joined: 09/24/2010

> make -C /lib/modules/2.6.35-28-generic/build
> SUBDIRS=/home/sy/src/arcmsr.1.20.0X.15-110330 BUILD_INI=m
> make: *** /lib/modules/2.6.35-28-generic/build: No such file or
> directory. Stop.
> make: *** [all] Error 2

Is linux-headers-generic installed?

Aries97
Offline
Joined: 06/18/2011

Nope. I take it that is required....

Installing.... and same behavior. I'm getting the feeling that the build/development environment, whatever, is missing something. Unfortunately there is definitely something I don't yet understand.

Aries97
Offline
Joined: 06/18/2011

Ah ha! Ok, the Makefile itself is directing make to that non-existent directory.
Makefile attached, and here is the relevant section:


# File: arcmsr/Makefile
# Makefile for the Areca ARC-11XX/12XX/16XX SAS/SATA RAID Controller
# Copyright (C) 2009 - 2012 Areca Technology Corporation <name at domain>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, version 2
# of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#
# Main targets:
# all (the default) : make all
# clean : clean files
# install : make all + install
# uninstall : uninstall
#
# Notes :
# - install and uninstall must be made as root

ifeq ($(KVER),)
ifeq ($(KDIR),)
KVER = $(shell uname -r)
KDIR := /lib/modules/$(KVER)/build
endif
else
KDIR := /lib/modules/$(KVER)/build
endif

Aries97
Offline
Joined: 06/18/2011

I installed "gcc" from the synaptic package manager; but I apparently should have chosen "g++" which installs other needed packages as well?....

Still same behavior; I now think that make is working correctly. I will have to investigate what the raid card source/Makefile needs that it isn't getting.

grvrulz
Offline
Joined: 09/23/2010

I guess you need to install build-essential package..

akirashinigami

I am a member!

I am a translator!

Offline
Joined: 02/25/2010

g++ is a compiler for C++; you shouldn't need it unless the source code is in C++, in which case you will need it.