List:General Discussion« Previous MessageNext Message »
From:Dan Date:March 18 1999 10:19pm
Subject:install / compile errors
View as plain text  
Thanks in advance for any help.
I am running Solaris7 on a Ultra5.

My first problem occurs when I run the
configure
script in mysql-3.22.20a
I get this error:
checking for restartable system calls... configure: error: can not run
test program while cross compiling
What does it mean and what do I do about it?


My second problem:
I have successfully installed the binary
mysql-3.22.19-sun-solaris2.6-sparc and everything runs as it should,
except I can not compile any of my own programs.

with the command
/usr/local/bin/g++
-I/usr/local/mysql-3.22.19-sun-solaris2.6-sparc/include
-L/usr/local/mysql-3.22.19-sun-solaris2.6-sparc/lib myprogram.cc
-lmysqlclient

I can compile a with just the headers, but if I uncomment anything I get
these errors on compile.
Am I missing a header file or library?

Undefined   first referenced
 symbol         in file
socket
/usr/local/mysql-3.22.19-sun-solaris2.6-sparc/lib/libmysqlclient.a(libmysql.o)

dlclose                             /usr/lib/libc.a(nss_deffinder.o)
gethostbyname
/usr/local/mysql-3.22.19-sun-solaris2.6-sparc/lib/libmysqlclient.a(libmysql.o)

setsockopt
/usr/local/mysql-3.22.19-sun-solaris2.6-sparc/lib/libmysqlclient.a(libmysql.o)

getservbyname
/usr/local/mysql-3.22.19-sun-solaris2.6-sparc/lib/libmysqlclient.a(libmysql.o)

getsockopt
/usr/local/mysql-3.22.19-sun-solaris2.6-sparc/lib/libmysqlclient.a(libmysql.o)

inet_addr
/usr/local/mysql-3.22.19-sun-solaris2.6-sparc/lib/libmysqlclient.a(libmysql.o)

shutdown
/usr/local/mysql-3.22.19-sun-solaris2.6-sparc/lib/libmysqlclient.a(libmysql.o)

dlsym                               /usr/lib/libc.a(nss_deffinder.o)
dlopen                              /usr/lib/libc.a(nss_deffinder.o)
connect
/usr/local/mysql-3.22.19-sun-solaris2.6-sparc/lib/libmysqlclient.a(libmysql.o)

ld: fatal: Symbol referencing errors. No output written to a.out



Here is myprogram.cc

#include "mysql.h"
#include <iostream.h>

#include <stdio.h>
#include <stdlib.h>

MYSQL mysql;

void exiterr(int exitcode)
{
        fprintf( stderr, "%s\n", mysql_error(&mysql) );
        exit( exitcode );
}

int main()
{
// if (!(mysql_connect(&mysql,"host","username","password")))
                exiterr(1);

// if (!(mysql_real_connect(&mysql,"host","username","password",
"personal", 0, NULL, 0)))
                exiterr(1);

// if (mysql_select_db(&mysql,"payroll"))
                exiterr(2);

cout << "Hi all" << endl;
}


Thread
install / compile errorsDan18 Mar
  • Re: install / compile errorsAlistair MacDonald18 Mar
  • install / compile errorsMichael Widenius19 Mar