LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   linux make command? (https://www.linuxquestions.org/questions/linux-newbie-8/linux-make-command-747547/)

qwertyjjj 08-14-2009 09:55 AM

linux make command?
 
I'm trying to install mysql_auth but it won't configure so I can make the install. ANy ideas?
[root@localhost ~]# cd mysql_auth-0.8
[root@localhost mysql_auth-0.8]# ./configure
-bash: ./configure: No such file or directory
[root@localhost mysql_auth-0.8]#

mysql_auth readme

joeBuffer 08-14-2009 10:11 AM

The readme doesn't mention using ./configure.
It mentions configuring things and using make and make install. Even using Edit->Find and searching for "configure" only turns up one match, and it's unrelated.

qwertyjjj 08-14-2009 10:18 AM

Quote:

Originally Posted by joeBuffer (Post 3643283)
The readme doesn't mention using ./configure.
It mentions configuring things and using make and make install. Even using Edit->Find and searching for "configure" only turns up one match, and it's unrelated.

when I type make it does nothing either just errors out
Code:

[root@localhost ~]# gunzip mysql_auth-0.8.tar.gz
[root@localhost ~]# tar -xvvf mysql_auth-0.8.tar.gz
tar: mysql_auth-0.8.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
[root@localhost ~]# tar -xvvf mysql_auth-0.8.tar
drwxr-xr-x airween/airween  0 2004-12-12 23:00:00 mysql_auth-0.8/
drwxr-xr-x airween/airween  0 2004-12-12 23:00:00 mysql_auth-0.8/src/
-rw-r--r-- airween/airween  39 2004-12-12 23:00:00 mysql_auth-0.8/src/extern.h
-rw-r--r-- airween/airween 8159 2004-12-12 23:00:00 mysql_auth-0.8/src/mypasswd.c
-rw-r--r-- airween/airween 1564 2004-12-12 23:00:00 mysql_auth-0.8/src/define.h
-rw-r--r-- airween/airween 2211 2004-12-12 23:00:00 mysql_auth-0.8/src/mysql_auth.conf
-rw-r--r-- airween/airween 4934 2004-12-12 23:00:00 mysql_auth-0.8/src/confparser.c
-rw-r--r-- airween/airween 5450 2004-12-12 23:00:00 mysql_auth-0.8/src/mysql_auth.c
-rw-r--r-- airween/airween  73 2004-12-12 23:00:00 mysql_auth-0.8/TODO
-rw-r--r-- airween/airween  816 2004-12-12 23:00:00 mysql_auth-0.8/Makefile
-rw-r--r-- airween/airween 18089 2004-12-12 23:00:00 mysql_auth-0.8/COPYING-2.0
drwxr-xr-x airween/airween    0 2004-12-12 23:00:00 mysql_auth-0.8/scripts/
-rw-r--r-- airween/airween  424 2004-12-12 23:00:00 mysql_auth-0.8/scripts/create_script
-rw-r--r-- airween/airween  9271 2004-12-12 23:00:00 mysql_auth-0.8/README.html
-rw-r--r-- airween/airween  1159 2004-12-12 23:00:00 mysql_auth-0.8/Changelog-0.8
[root@localhost ~]# make
make: *** No targets specified and no makefile found.  Stop.
[root@localhost ~]# cd mysql_auth-0.8
[root@localhost mysql_auth-0.8]# make
gcc -I/usr/local/include -L/usr/local/lib  -c -o src/mysql_auth.o src/mysql_auth.c
make: gcc: Command not found
make: *** [src/mysql_auth.o] Error 127
[root@localhost mysql_auth-0.8]#

Also in the Makefile should the nobody users be changed to squid? That's what my squid runs as:
Code:

install:
        $(INSTALL) -o nobody -g nogroup -m 755 mysql_auth /usr/local/squid/libexec/mysql_auth
        $(INSTALL) -o root -g root -m 700 mypasswd /usr/local/bin/mypasswd
        $(INSTALL) -o nobody -g nogroup -m 600 $(CONF) /usr/local/squid/etc/mysql_auth.conf
        $(INSTALL) -o nobody -g nogroup -m 600 $(CONF) /usr/local/squid/etc/mysql_auth.conf.default

Code:

[root@localhost mysql_auth-0.8]# vi Makefile
CC = gcc
CFLAGS = -I/usr/local/include -L/usr/local/lib
LDFLAGS = -lmysqlclient
SRC = src
OBJS = $(SRC)/mysql_auth.o $(SRC)/confparser.o $(SRC)/mypasswd.o
INSTALL = /usr/bin/install
CONF = $(SRC)/mysql_auth.conf

all : mysql_auth mypasswd

clean:
        rm -rf src/*.o *.o mysql_auth mypasswd

mysql_auth: $(OBJS)
        $(CC) -o $@ $(SRC)/mysql_auth.c $(SRC)/confparser.c $(LDFLAGS) $(CFLAGS)

mypasswd: $(OBJS)
        $(CC) -o $@ $(SRC)/mypasswd.c $(SRC)/confparser.c $(LDFLAGS) $(CFLAGS)

install:
        $(INSTALL) -o nobody -g nogroup -m 755 mysql_auth /usr/local/squid/libexec/mysql_auth
        $(INSTALL) -o root -g root -m 700 mypasswd /usr/local/bin/mypasswd
        $(INSTALL) -o nobody -g nogroup -m 600 $(CONF) /usr/local/squid/etc/mysql_auth.conf
        $(INSTALL) -o nobody -g nogroup -m 600 $(CONF) /usr/local/squid/etc/mysql_auth.conf.default


centosboy 08-14-2009 10:37 AM

Quote:

Originally Posted by qwertyjjj (Post 3643287)
when I type make it does nothing either just errors out
Code:

[root@localhost ~]# gunzip mysql_auth-0.8.tar.gz
[root@localhost ~]# tar -xvvf mysql_auth-0.8.tar.gz
tar: mysql_auth-0.8.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
[root@localhost ~]# tar -xvvf mysql_auth-0.8.tar
drwxr-xr-x airween/airween  0 2004-12-12 23:00:00 mysql_auth-0.8/
drwxr-xr-x airween/airween  0 2004-12-12 23:00:00 mysql_auth-0.8/src/
-rw-r--r-- airween/airween  39 2004-12-12 23:00:00 mysql_auth-0.8/src/extern.h
-rw-r--r-- airween/airween 8159 2004-12-12 23:00:00 mysql_auth-0.8/src/mypasswd.c
-rw-r--r-- airween/airween 1564 2004-12-12 23:00:00 mysql_auth-0.8/src/define.h
-rw-r--r-- airween/airween 2211 2004-12-12 23:00:00 mysql_auth-0.8/src/mysql_auth.conf
-rw-r--r-- airween/airween 4934 2004-12-12 23:00:00 mysql_auth-0.8/src/confparser.c
-rw-r--r-- airween/airween 5450 2004-12-12 23:00:00 mysql_auth-0.8/src/mysql_auth.c
-rw-r--r-- airween/airween  73 2004-12-12 23:00:00 mysql_auth-0.8/TODO
-rw-r--r-- airween/airween  816 2004-12-12 23:00:00 mysql_auth-0.8/Makefile
-rw-r--r-- airween/airween 18089 2004-12-12 23:00:00 mysql_auth-0.8/COPYING-2.0
drwxr-xr-x airween/airween    0 2004-12-12 23:00:00 mysql_auth-0.8/scripts/
-rw-r--r-- airween/airween  424 2004-12-12 23:00:00 mysql_auth-0.8/scripts/create_script
-rw-r--r-- airween/airween  9271 2004-12-12 23:00:00 mysql_auth-0.8/README.html
-rw-r--r-- airween/airween  1159 2004-12-12 23:00:00 mysql_auth-0.8/Changelog-0.8
[root@localhost ~]# make
make: *** No targets specified and no makefile found.  Stop.
[root@localhost ~]# cd mysql_auth-0.8
[root@localhost mysql_auth-0.8]# make
gcc -I/usr/local/include -L/usr/local/lib  -c -o src/mysql_auth.o src/mysql_auth.c
make: gcc: Command not found
make: *** [src/mysql_auth.o] Error 127
[root@localhost mysql_auth-0.8]#

Also in the Makefile should the nobody users be changed to squid? That's what my squid runs as:
Code:

install:
        $(INSTALL) -o nobody -g nogroup -m 755 mysql_auth /usr/local/squid/libexec/mysql_auth
        $(INSTALL) -o root -g root -m 700 mypasswd /usr/local/bin/mypasswd
        $(INSTALL) -o nobody -g nogroup -m 600 $(CONF) /usr/local/squid/etc/mysql_auth.conf
        $(INSTALL) -o nobody -g nogroup -m 600 $(CONF) /usr/local/squid/etc/mysql_auth.conf.default

Code:

[root@localhost mysql_auth-0.8]# vi Makefile
CC = gcc
CFLAGS = -I/usr/local/include -L/usr/local/lib
LDFLAGS = -lmysqlclient
SRC = src
OBJS = $(SRC)/mysql_auth.o $(SRC)/confparser.o $(SRC)/mypasswd.o
INSTALL = /usr/bin/install
CONF = $(SRC)/mysql_auth.conf

all : mysql_auth mypasswd

clean:
        rm -rf src/*.o *.o mysql_auth mypasswd

mysql_auth: $(OBJS)
        $(CC) -o $@ $(SRC)/mysql_auth.c $(SRC)/confparser.c $(LDFLAGS) $(CFLAGS)

mypasswd: $(OBJS)
        $(CC) -o $@ $(SRC)/mypasswd.c $(SRC)/confparser.c $(LDFLAGS) $(CFLAGS)

install:
        $(INSTALL) -o nobody -g nogroup -m 755 mysql_auth /usr/local/squid/libexec/mysql_auth
        $(INSTALL) -o root -g root -m 700 mypasswd /usr/local/bin/mypasswd
        $(INSTALL) -o nobody -g nogroup -m 600 $(CONF) /usr/local/squid/etc/mysql_auth.conf
        $(INSTALL) -o nobody -g nogroup -m 600 $(CONF) /usr/local/squid/etc/mysql_auth.conf.default



Code:


yum -y install gcc


qwertyjjj 08-14-2009 10:40 AM

Thanks

Also in the Makefile should the nobody users be changed to squid? That's what my squid runs as:
Code:

install:
        $(INSTALL) -o nobody -g nogroup -m 755 mysql_auth /usr/local/squid/libexec/mysql_auth
        $(INSTALL) -o root -g root -m 700 mypasswd /usr/local/bin/mypasswd
        $(INSTALL) -o nobody -g nogroup -m 600 $(CONF) /usr/local/squid/etc/mysql_auth.conf
        $(INSTALL) -o nobody -g nogroup -m 600 $(CONF) /usr/local/squid/etc/mysql_auth.conf.default

My current squid.conf is in /etc/squid.
Does that mean it's better to change all parts of the install to something like /etc/squid/mysql_auth?

Code:

[root@localhost mysql_auth-0.8]# vi Makefile
CC = gcc
CFLAGS = -I/usr/local/include -L/usr/local/lib
LDFLAGS = -lmysqlclient
SRC = src
OBJS = $(SRC)/mysql_auth.o $(SRC)/confparser.o $(SRC)/mypasswd.o
INSTALL = /usr/bin/install
CONF = $(SRC)/mysql_auth.conf

all : mysql_auth mypasswd

clean:
        rm -rf src/*.o *.o mysql_auth mypasswd

mysql_auth: $(OBJS)
        $(CC) -o $@ $(SRC)/mysql_auth.c $(SRC)/confparser.c $(LDFLAGS) $(CFLAGS)

mypasswd: $(OBJS)
        $(CC) -o $@ $(SRC)/mypasswd.c $(SRC)/confparser.c $(LDFLAGS) $(CFLAGS)

install:
        $(INSTALL) -o nobody -g nogroup -m 755 mysql_auth /usr/local/squid/libexec/mysql_auth
        $(INSTALL) -o root -g root -m 700 mypasswd /usr/local/bin/mypasswd
        $(INSTALL) -o nobody -g nogroup -m 600 $(CONF) /usr/local/squid/etc/mysql_auth.conf
        $(INSTALL) -o nobody -g nogroup -m 600 $(CONF) /usr/local/squid/etc/mysql_auth.conf.default


qwertyjjj 08-14-2009 11:39 AM

hmm

Code:

[root@localhost mysql_auth-0.8]# make
gcc -I/usr/local/include -L/usr/local/lib  -c -o src/mysql_auth.o src/mysql_auth.c
src/mysql_auth.c:24:25: error: mysql/mysql.h: No such file or directory
src/mysql_auth.c: In function 'main':
src/mysql_auth.c:37: error: 'MYSQL' undeclared (first use in this function)
src/mysql_auth.c:37: error: (Each undeclared identifier is reported only once
src/mysql_auth.c:37: error: for each function it appears in.)
src/mysql_auth.c:37: error: expected ';' before 'connect'
src/mysql_auth.c:38: error: 'MYSQL_RES' undeclared (first use in this function)
src/mysql_auth.c:38: error: 'result' undeclared (first use in this function)
src/mysql_auth.c:39: error: 'MYSQL_ROW' undeclared (first use in this function)
src/mysql_auth.c:39: error: expected ';' before 'row'
src/mysql_auth.c:63: error: 'connect' undeclared (first use in this function)
src/mysql_auth.c:184: error: 'row' undeclared (first use in this function)
make: *** [src/mysql_auth.o] Error 1
[root@localhost mysql_auth-0.8]#



All times are GMT -5. The time now is 11:36 AM.