Link to home
Start Free TrialLog in
Avatar of olbion
olbion

asked on

Configuring PHP for MSSQL on Mandrake

This is my problem: Fatal error: Call to undefined function: mssql_connect()

I realise that I have to configure PHP/Apache to work with Mssql, but my attempts to do this have all failed.

My webserver is running on a recent Mandrake distribution. It is Apache 2.0.48 and PHP 4.3.4. If you want to see my phpinfo, look at http://www.quadplex.com/test.php. I am very new to Linux, so doing simple things take a long time. To enable mysql, i installed an rpm. To enable mssql, I have tried the following:

*Installed the following rpm: http://rpm.pbone.net/index.php3/stat/4/idpl/1406112/com/php5-mssql-5.0.1-1mdk.i586.rpm.html. I realised though that this was intended for php5 which may be why it doesnt work.
*Installed http://rpm.pbone.net/index.php3/stat/4/idpl/1398797/com/php432-devel-4.3.8-3mdk.i586.rpm.html. This is intended for php 4.3.2, I have 4.3.4, but I could not find an RPM for this.
*Configured php.ini to include the extension file mssql.so. I know this is the right place to do so, cause when I remove the mysql extension here, mysql stops functioning.

Do I have to recompile Apache or PHP? If so, I have never really done that. Apache and PHP came ready with the Mandrake distribution. I should add that there are many users of my website, so if I have to stop it and recompile it, it has to go fast, in other words I have to know what Im doing.

The reason I want to add mssql is that I want to host another website as well, which connects to an MsSQL database.

Thank you for all your help.
Avatar of Sasho
Sasho

I am not sure which Mandrake you have but here is the search from the place where you get your RPMs:

Mandrake Other  carroll.cac.psu.edu/pub/linux/distributions/mandrakelinux/devel/cooker/i586/media/contrib/php5-devel-5.0.1-1mdk.i586.rpm
Mandrake 10.X  carroll.cac.psu.edu/pub/linux/distributions/mandrakelinux/devel/10.1/i586/media/contrib/php5-devel-5.0.1-1mdk.i586.rpm
Mandrake 10.X  carroll.cac.psu.edu/pub/linux/distributions/mandrakelinux/devel/10.1/i586/media/main/php432-devel-4.3.8-3mdk.i586.rpm
Mandrake Other  carroll.cac.psu.edu/pub/linux/distributions/mandrakelinux/devel/cooker/i586/media/main/php432-devel-4.3.8-3mdk.i586.rpm
Mandrake 10.X  carroll.cac.psu.edu/pub/linux/distributions/mandrakelinux/official/10.0/i586/Mandrake/RPMS/php432-devel-4.3.4-4mdk.i586.rpm
Mandrake 10.X  carroll.cac.psu.edu/pub/linux/distributions/mandrakelinux/devel/10.0/i586/Mandrake/RPMS/php432-devel-4.3.4-4mdk.i586.rpm
Mandrake 10.X  carroll.cac.psu.edu/pub/linux/distributions/mandrakelinux/official/updates/10.0/RPMS/php432-devel-4.3.4-4.1.100mdk.i586.rpm
Mandrake 10.X  carroll.cac.psu.edu/pub/linux/distributions/mandrakelinux/devel/10.0/i586/Mandrake/RPMS/php432-devel-4.3.4-4.1.100mdk.i586.rpm
Mandrake Other  ftp.ibiblio.org/pub/Linux/distributions/contrib/texstar/pclinuxos/apt/pclinuxos/2004/RPMS.os/php432-devel-4.3.3-2mdk.i586.rpm
Mandrake 9.X  carroll.cac.psu.edu/pub/linux/distributions/mandrakelinux/official/9.2/i586/Mandrake/RPMS/php432-devel-4.3.3-2mdk.i586.rpm
Mandrake 9.X  carroll.cac.psu.edu/pub/linux/distributions/mandrakelinux/official/updates/9.2/RPMS/php432-devel-4.3.3-2.1.92mdk.i586.rpm
Mandrake 9.X  carroll.cac.psu.edu/pub/linux/distributions/mandrakelinux/official/9.1/i586/Mandrake/RPMS/php430-devel-430-11mdk.i586.rpm
Mandrake 9.X  carroll.cac.psu.edu/pub/linux/distributions/mandrakelinux/official/updates/9.1/RPMS/php430-devel-430-11.2.91mdk.i586.rpm
Mandrake 9.X  ftp.rpmhelp.net/pub/9.0/RPMS/php-devel-4.3.3-2rph.i586.rpm
Mandrake Other  carroll.cac.psu.edu/pub/linux/distributions/mandrakelinux/official/updates/corporate/2.1/RPMS/php-devel-4.2.3-4.2.C21mdk.i586.rpm
Mandrake 9.X  carroll.cac.psu.edu/pub/linux/distributions/mandrakelinux/old/updates/9.0/RPMS/php-devel-4.2.3-4.1mdk.i586.rpm
Mandrake 9.X  carroll.cac.psu.edu/pub/linux/distributions/mandrakelinux/old/9.0/i586/Mandrake/RPMS/php-devel-4.2.3-1mdk.i586.rpm
Mandrake 8.X  carroll.cac.psu.edu/pub/linux/distributions/mandrakelinux/old/8.2/i586/Mandrake/RPMS/php-devel-4.1.2-1mdk.i586.rpm
Mandrake 8.X  carroll.cac.psu.edu/pub/linux/distributions/mandrakelinux/old/updates/8.2/RPMS/php-devel-4.1.2-1.2mdk.i586.rpm
Mandrake 7.X  carroll.cac.psu.edu/pub/linux/distributions/mandrakelinux/old/updates/7.1/RPMS/php-devel-4.0.6-6.4mdk.i586.rpm
Mandrake 7.X  carroll.cac.psu.edu/pub/linux/distributions/mandrakelinux/old/updates/7.2/RPMS/php-devel-4.0.6-6.3mdk.i586.rpm
Mandrake 8.X  carroll.cac.psu.edu/pub/linux/distributions/mandrakelinux/old/updates/8.0/RPMS/php-devel-4.0.6-6.2mdk.i586.rpm
Mandrake 8.X  carroll.cac.psu.edu/pub/linux/distributions/mandrakelinux/old/updates/8.1/RPMS/php-devel-4.0.6-6.1mdk.i586.rpm
Mandrake 8.X  carroll.cac.psu.edu/pub/linux/distributions/mandrakelinux/old/8.1/i586/Mandrake/RPMS/php-devel-4.0.6-5mdk.i586.rpm
Mandrake 8.X  carroll.cac.psu.edu/pub/linux/distributions/mandrakelinux/old/8.0/i586/Mandrake/RPMS/php-devel-4.0.4pl1-6mdk.i586.rpm
Mandrake 7.X  carroll.cac.psu.edu/pub/linux/distributions/mandrakelinux/old/7.2/i586/Mandrake/RPMS/php-devel-4.0.3pl1-1mdk.i586.rpm
Avatar of olbion

ASKER

OK, here's what I did:

*Installed Mandrake 10.X  carroll.cac.psu.edu/pub/linux/distributions/mandrakelinux/official/10.0/i586/Mandrake/RPMS/php432-devel-4.3.4-4mdk.i586.rpm
*Made sure that the extension=mssql.so is uncommented in php.ini
*Restarted Apache

Doesnt work.

Now, Im starting to suspect something about my version of Mandrake. When I installed it a month ago, I thought I grabbed the newest version from their website, that is version 10. But, my phpinfo shows that I have Mandrake Linux/6mdk. And the rpm's for Mandrake 10 are all 4mdk. Im not sure what this means, but could it be why its not working for me?
I still don't see you installing the "sybase_ct" extensions. It is my mistake I cut and pasted the wrong thing in my second comment.
The devel extension does not have native MS SQL support you need the "sybase_ct" extension.

Also take a look at the freetds package, you will probably need to use that as well
http://www.freetds.org/
Avatar of olbion

ASKER

In that case, I dont know which rpm to install. I know that the one I installed, php432-devel, is supposed to contain the file sybase_ct. If I need an rpm that is itself called sybase_ct I dont know which one that is.

Freetds I have already installed...
Here is more info on the sybase_ct extension
http://zugeschaut-und-mitgebaut.de/php/extension.sybase_ct.html
Avatar of olbion

ASKER

The sybase_ct rpm requires freetds like you said, and now Im trying to install that... I read the manual at freetds.org and managed to download the package and run ./configure which outputs a lot of text but stops with an error:

configure: error: C++ preprocessor */lib/ccp* fails sanity check
See 'config.log' for mroe details'

The config.log shows this:

Syntax error
configure:4852: /lib/cpp   -D_FREETDS_LIBRARY_SOURCE conftest.cc
cpp: installation problem, cannot exec 'cclpus': No such file or directory

I installed cpp and made sure that it does exist in the path /lib/cpp. Searching for cclplus doesnt give me many clues, nor does the documentation at freedts.org show anything about this error.

What am I doing wrong?
Hmm...I am not sure whay you are getting this error. In my environment when I run configure it finishes without error.
I looked a bit into the configuyre script and did not see anything weird.

One thing I noticed from your post is the reference to 'cclpus'
This looks like a mispelling of 'ccplus' I would start there.
Also can you give the text right before you get the error, it could help in figuring out how far the configure script got before failing.
Avatar of olbion

ASKER

If it is a misspelling it is not by me. The log says cclplus.

Before the error the text is:

checking how to run the C++ preprocessor... /lib/cpp
configure: error: C++...
Can you run "./configure > dump.log"

ANd then paste the dump.log on here. In my environment (Debian) the line is different I get:
"checking how to run the C++ preprocessor... g++ -E"

And no error.
Avatar of olbion

ASKER

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for a sed that does not truncate output... /bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking dependency style of g++... none
checking how to run the C++ preprocessor... /lib/cpp

The version I downloaded is called the latest stable release and its number is 0.62.4
So the difference is here:
checking for g++... no <----( I have yes)
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no <----( I have yes)
checking whether g++ accepts -g... no
checking dependency style of g++... none
checking how to run the C++ preprocessor... /lib/cpp

My guess would be that the c++ compiler installed on your machine does not play nice with the configuration script. Is installing g++ an option?


Also can you paste the config.log after the line where it says:
"configure:4352: checking for g++"

It seems the configure.log has a lot more info as well.
Thanks
Avatar of olbion

ASKER

Hey Sasho,

Sorry about the delay, been very busy with other things. Here we go...

Installing g++? I tried through installing some RPM called uClibc-devel-0.9.21-3mdk.i586.rpm which contains g++ but it makes no difference, it still says g++ NO and gives the same error

Here is the configure.log after that line:

configure:4352: checking for g++
configure:4381: result: no
configure:4352: checking for c++
configure:4381: result: no
configure:4352: checking for gpp
configure:4381: result: no
configure:4352: checking for aCC
configure:4381: result: no
configure:4352: checking for CC
configure:4381: result: no
configure:4352: checking for cxx
configure:4381: result: no
configure:4352: checking for cc++
configure:4381: result: no
configure:4352: checking for cl
configure:4381: result: no
configure:4352: checking for FCC
configure:4381: result: no
configure:4352: checking for KCC
configure:4381: result: no
configure:4352: checking for RCC
configure:4381: result: no
configure:4352: checking for xlC_r
configure:4381: result: no
configure:4352: checking for xlC
configure:4381: result: no
configure:4394: checking for C++ compiler version
configure:4397: g++ --version </dev/null >&5
./configure: line 1: g++: command not found
configure:4400: $? = 127
configure:4402: g++ -v </dev/null >&5
./configure: line 1: g++: command not found
configure:4405: $? = 127
configure:4407: g++ -V </dev/null >&5
./configure: line 1: g++: command not found
configure:4410: $? = 127
configure:4413: checking whether we are using the GNU C++ compiler
configure:4438: g++ -c   -D_FREETDS_LIBRARY_SOURCE conftest.cc >&5
./configure: line 1: g++: command not found
configure:4441: $? = 127
configure: failed program was:
| #line 4418 "configure"
| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "freetds"
| #define VERSION "0.62.4"
| #define _GNU_SOURCE 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| /* end confdefs.h.  */
|
| int
| main ()
| {
| #ifndef __GNUC__
|        choke me
| #endif
|
|   ;
|   return 0;
| }
configure:4460: result: no
configure:4466: checking whether g++ accepts -g
configure:4488: g++ -c -g  -D_FREETDS_LIBRARY_SOURCE conftest.cc >&5
./configure: line 1: g++: command not found
configure:4491: $? = 127
configure: failed program was:
| #line 4471 "configure"
| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "freetds"
| #define VERSION "0.62.4"
| #define _GNU_SOURCE 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:4508: result: no
configure:4552: g++ -c   -D_FREETDS_LIBRARY_SOURCE conftest.cc >&5
./configure: line 1: g++: command not found
configure:4555: $? = 127
configure: failed program was:
| #line 4534 "configure"
| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "freetds"
| #define VERSION "0.62.4"
| #define _GNU_SOURCE 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| /* end confdefs.h.  */
| #include <stdlib.h>
|
| int
| main ()
| {
| exit (42);
|   ;
|   return 0;
| }
configure:4552: g++ -c   -D_FREETDS_LIBRARY_SOURCE conftest.cc >&5
./configure: line 1: g++: command not found
configure:4555: $? = 127
configure: failed program was:
| #line 4534 "configure"
| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "freetds"
| #define VERSION "0.62.4"
| #define _GNU_SOURCE 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| /* end confdefs.h.  */
| #include <stdlib.h>
| #include <stdlib.h>
| int
| main ()
| {
| exit (42);
|   ;
|   return 0;
| }
configure:4552: g++ -c   -D_FREETDS_LIBRARY_SOURCE conftest.cc >&5
./configure: line 1: g++: command not found
configure:4555: $? = 127
configure: failed program was:
| #line 4534 "configure"
| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "freetds"
| #define VERSION "0.62.4"
| #define _GNU_SOURCE 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| /* end confdefs.h.  */
| #include <stdlib.h>
| extern "C" void std::exit (int) throw (); using std::exit;
| int
| main ()
| {
| exit (42);
|   ;
|   return 0;
| }
configure:4552: g++ -c   -D_FREETDS_LIBRARY_SOURCE conftest.cc >&5
./configure: line 1: g++: command not found
configure:4555: $? = 127
configure: failed program was:
| #line 4534 "configure"
| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "freetds"
| #define VERSION "0.62.4"
| #define _GNU_SOURCE 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| /* end confdefs.h.  */
| #include <stdlib.h>
| extern "C" void std::exit (int); using std::exit;
| int
| main ()
| {
| exit (42);
|   ;
|   return 0;
| }
configure:4552: g++ -c   -D_FREETDS_LIBRARY_SOURCE conftest.cc >&5
./configure: line 1: g++: command not found
configure:4555: $? = 127
configure: failed program was:
| #line 4534 "configure"
| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "freetds"
| #define VERSION "0.62.4"
| #define _GNU_SOURCE 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| /* end confdefs.h.  */
| #include <stdlib.h>
| extern "C" void exit (int) throw ();
| int
| main ()
| {
| exit (42);
|   ;
|   return 0;
| }
configure:4552: g++ -c   -D_FREETDS_LIBRARY_SOURCE conftest.cc >&5
./configure: line 1: g++: command not found
configure:4555: $? = 127
configure: failed program was:
| #line 4534 "configure"
| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "freetds"
| #define VERSION "0.62.4"
| #define _GNU_SOURCE 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| /* end confdefs.h.  */
| #include <stdlib.h>
| extern "C" void exit (int);
| int
| main ()
| {
| exit (42);
|   ;
|   return 0;
| }
configure:4552: g++ -c   -D_FREETDS_LIBRARY_SOURCE conftest.cc >&5
./configure: line 1: g++: command not found
configure:4555: $? = 127
configure: failed program was:
| #line 4534 "configure"
| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "freetds"
| #define VERSION "0.62.4"
| #define _GNU_SOURCE 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| /* end confdefs.h.  */
| #include <stdlib.h>
| void exit (int);
| int
| main ()
| {
| exit (42);
|   ;
|   return 0;
| }
configure:4622: checking dependency style of g++
configure:4690: result: none
configure:4712: checking how to run the C++ preprocessor
configure:4744: g++ -E  -D_FREETDS_LIBRARY_SOURCE conftest.cc
./configure: line 1: g++: command not found
configure:4750: $? = 127
configure: failed program was:
| #line 4730 "configure"
| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "freetds"
| #define VERSION "0.62.4"
| #define _GNU_SOURCE 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #ifdef __cplusplus
| void exit (int);
| #endif
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
|                      Syntax error
configure:4744: g++ -E  -D_FREETDS_LIBRARY_SOURCE conftest.cc
./configure: line 1: g++: command not found
configure:4750: $? = 127
configure: failed program was:
| #line 4730 "configure"
| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "freetds"
| #define VERSION "0.62.4"
| #define _GNU_SOURCE 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #ifdef __cplusplus
| void exit (int);
| #endif
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
|                      Syntax error
configure:4744: /lib/cpp  -D_FREETDS_LIBRARY_SOURCE conftest.cc
cpp: installation problem, cannot exec `cc1plus': No such file or directory
configure:4750: $? = 1
configure: failed program was:
| #line 4730 "configure"
| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "freetds"
| #define VERSION "0.62.4"
| #define _GNU_SOURCE 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #ifdef __cplusplus
| void exit (int);
| #endif
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
|                      Syntax error
configure:4744: /lib/cpp  -D_FREETDS_LIBRARY_SOURCE conftest.cc
cpp: installation problem, cannot exec `cc1plus': No such file or directory
configure:4750: $? = 1
configure: failed program was:
| #line 4730 "configure"
| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "freetds"
| #define VERSION "0.62.4"
| #define _GNU_SOURCE 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #ifdef __cplusplus
| void exit (int);
| #endif
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
|                      Syntax error
configure:4826: result: /lib/cpp
configure:4851: /lib/cpp  -D_FREETDS_LIBRARY_SOURCE conftest.cc
cpp: installation problem, cannot exec `cc1plus': No such file or directory
configure:4857: $? = 1
configure: failed program was:
| #line 4837 "configure"
| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "freetds"
| #define VERSION "0.62.4"
| #define _GNU_SOURCE 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #ifdef __cplusplus
| void exit (int);
| #endif
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
|                      Syntax error
configure:4851: /lib/cpp  -D_FREETDS_LIBRARY_SOURCE conftest.cc
cpp: installation problem, cannot exec `cc1plus': No such file or directory
configure:4857: $? = 1
configure: failed program was:
| #line 4837 "configure"
| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "freetds"
| #define VERSION "0.62.4"
| #define _GNU_SOURCE 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #ifdef __cplusplus
| void exit (int);
| #endif
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
|                      Syntax error
configure:4925: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=i686-pc-linux-gnu
ac_cv_build_alias=i686-pc-linux-gnu
ac_cv_c_compiler_gnu=yes
ac_cv_cxx_compiler_gnu=no
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_F77_set=
ac_cv_env_F77_value=
ac_cv_env_FFLAGS_set=
ac_cv_env_FFLAGS_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_exeext=
ac_cv_header_dlfcn_h=yes
ac_cv_header_inttypes_h=yes
ac_cv_header_memory_h=yes
ac_cv_header_stdc=yes
ac_cv_header_stdint_h=yes
ac_cv_header_stdlib_h=yes
ac_cv_header_string_h=yes
ac_cv_header_strings_h=yes
ac_cv_header_sys_stat_h=yes
ac_cv_header_sys_types_h=yes
ac_cv_header_unistd_h=yes
ac_cv_host=i686-pc-linux-gnu
ac_cv_host_alias=i686-pc-linux-gnu
ac_cv_objext=o
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AWK=gawk
ac_cv_prog_CPP='gcc -E'
ac_cv_prog_CXXCPP=/lib/cpp
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_cc_g=yes
ac_cv_prog_cc_stdc=
ac_cv_prog_cxx_g=no
ac_cv_prog_egrep='grep -E'
ac_cv_prog_make_make_set=yes
am_cv_CC_dependencies_compiler_type=gcc3
am_cv_CXX_dependencies_compiler_type=none
lt_cv_deplibs_check_method=pass_all
lt_cv_file_magic_cmd='$MAGIC_CMD'
lt_cv_file_magic_test_file='/lib/libc.so.6 /lib/libc-2.3.3.so'
lt_cv_ld_reload_flag=-r
lt_cv_path_LD=/usr/bin/ld
lt_cv_path_NM='/usr/bin/nm -B'
lt_cv_path_SED=/bin/sed
lt_cv_prog_gnu_ld=yes

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL='${SHELL} /home/olof/install/freetds-0.62.4/missing --run aclocal-1.7'
AMDEPBACKSLASH='\'
AMDEP_FALSE='#'
AMDEP_TRUE=''
AMTAR='${SHELL} /home/olof/install/freetds-0.62.4/missing --run tar'
AR=''
AUTOCONF='${SHELL} /home/olof/install/freetds-0.62.4/missing --run autoconf'
AUTOHEADER='${SHELL} /home/olof/install/freetds-0.62.4/missing --run autoheader'
AUTOMAKE='${SHELL} /home/olof/install/freetds-0.62.4/missing --run automake-1.7'
AWK='gawk'
CC='gcc'
CCDEPMODE='depmode=gcc3'
CFLAGS='-g -O2'
CPP='gcc -E'
CPPFLAGS=' -D_FREETDS_LIBRARY_SOURCE'
CXX='g++'
CXXCPP='/lib/cpp'
CXXDEPMODE='depmode=none'
CXXFLAGS=''
CYGPATH_W='echo'
DEFS=''
DEPDIR='.deps'
DISTCHECK_BUILD_FALSE=''
DISTCHECK_BUILD_TRUE=''
DOXYGEN=''
ECHO='echo'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP='grep -E'
EXEEXT=''
F77=''
FFLAGS=''
HAVE_DOXYGEN_FALSE=''
HAVE_DOXYGEN_TRUE=''
INCAPPS_FALSE=''
INCAPPS_TRUE=''
INCODBC_FALSE=''
INCODBC_TRUE=''
INCPOOL_FALSE=''
INCPOOL_TRUE=''
INCSERVER_FALSE=''
INCSERVER_TRUE=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='${SHELL} $(install_sh) -c -s'
LDFLAGS=''
LIBICONV=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LN_S='ln -s'
LTLIBOBJS=''
MAKEINFO='${SHELL} /home/olof/install/freetds-0.62.4/missing --run makeinfo'
NETWORK_LIBS=''
OBJEXT='o'
ODBC=''
ODBCINSTLIB=''
ODBCLIB=''
ODBCNODMLIB=''
ODBC_FALSE=''
ODBC_INC=''
ODBC_TRUE=''
PACKAGE='freetds'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
RANLIB=''
READLINE_LIBS=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP=''
SYBASE_COMPAT_FALSE=''
SYBASE_COMPAT_TRUE=''
UNIXODBC_FALSE=''
UNIXODBC_TRUE=''
VERSION='0.62.4'
ac_ct_AR=''
ac_ct_CC='gcc'
ac_ct_CXX='g++'
ac_ct_F77=''
ac_ct_RANLIB=''
ac_ct_STRIP=''
am__fastdepCC_FALSE='#'
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE=''
am__fastdepCXX_TRUE='#'
am__include='include'
am__leading_dot='.'
am__quote=''
bindir='${exec_prefix}/bin'
build='i686-pc-linux-gnu'
build_alias=''
build_cpu='i686'
build_os='linux-gnu'
build_vendor='pc'
datadir='${prefix}/share'
exec_prefix='NONE'
host='i686-pc-linux-gnu'
host_alias=''
host_cpu='i686'
host_os='linux-gnu'
host_vendor='pc'
includedir='${prefix}/include'
infodir='${prefix}/info'
install_sh='/home/olof/install/freetds-0.62.4/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localstatedir='${prefix}/var'
mandir='${prefix}/man'
oldincludedir='/usr/include'
prefix='NONE'
program_transform_name='s,x,x,'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
tds_sysdep_int16_type=''
tds_sysdep_int32_type=''
tds_sysdep_int64_type=''
tds_sysdep_intptr_type=''
tds_sysdep_real32_type=''
tds_sysdep_real64_type=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define HAVE_DLFCN_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STDINT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRINGS_H 1
#define HAVE_STRING_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_UNISTD_H 1
#define PACKAGE "freetds"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_NAME ""
#define PACKAGE_STRING ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define STDC_HEADERS 1
#define VERSION "0.62.4"
#define _GNU_SOURCE 1
#endif
#ifdef __cplusplus
void exit (int);

configure: exit 1
Look at the following line from the log file:
./configure: line 1: g++: command not found

It looks like it needs g++ for whatever reason. It keeps trying to use it and cannot find the command. If you have it installed make sure it is in your path.
Avatar of olbion

ASKER

How do I make sure I have it installed? And how can I check it is in my path?
well if you type g++ on the command line by itself you should get
"g++: No input files"

It looks like in your case you are getting:
"g++: command not found"

Which means it is not on there or not in your path. To find out if the executable "g++" is anywhere on the system go to the root directory "cd /"
and execute " find . -name g++ 2> /dev/null"

On my system I get the following output:
./usr/bin/g++
./usr/share/doc/g++
./usr/doc/g++

This tells me g++ is at /usr/bin
Now if /usr/bin is not in my path I would need to run g++ by typing /usr/bin/g++ every time or put /usr/bin in my path.
(Sidenote: By default /usr/bin should be in the path)


Sean I realize you probably do not care about points, but I wanted you to know I meant to split the points, but clicked on the wrong thing.
I feel you gave me help understanding the way unicode works and why it is not uniform across all platforms.
Let me know and I can make a separate questions with points for you.
Ooops wrong question...sorry
Avatar of olbion

ASKER

I found I have g++ installed in this path: /usr/i386-linux-uclibc/usr/bin
And it is not in my default paths, but I added it before running configure by running PATH=$PATH:/usr/i386-linux-uclibc/usr/bin
Then when I run configure I get a different response to g++, but the same error...

checking for g++... g++
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking dependency style of g++... none
checking how to run the C++ preprocessor... /lib/cpp
configure: error: C++ preprocessor "/lib/cpp" fails sanity check

I guess this must mean that the g++ that I got is not working right. If I just type g++ I get /usr/bin/g++: No such file or directory

Could you point me to some good way of installing g++? Or what should I do?
ASKER CERTIFIED SOLUTION
Avatar of Sasho
Sasho

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I would start reading here http://gcc.gnu.org/