LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 02-23-2006, 01:07 PM   #1
todman
LQ Newbie
 
Registered: Nov 2004
Distribution: Suse 10.0
Posts: 4

Rep: Reputation: 0
compile errors "no such file" with vsftpd and SSL on suse 10


Hello all.
I hope this is the correct forum.
Am running suse 10.0 as ftp server.
I downloaded the tar for vsftpd and ssl. openssl compiled beautifully with no errors. Then I changed the builddefs.h to include #define VSF_BUILD_SSL and took out #undef VSF_BUILD_SSL
Tried to compile vsftpd with ssl and am getting errors.


The ssl files that are needed are located at
/usr/local/ssl/include/openssl
It looks like vsftpd expects them to be somewhere else.
For the unix experts I assume this will seem like a trivial issue.
For me who is new to this I have struggled to get this to compile.
Could someone please suggest a solution for this.

Thanks.

The start of the errors are:
ssl.c:27:25: error: openssl/err.h: No such file or directory
ssl.c:28:26: error: openssl/rand.h: No such file or directory
ssl.c:29:25: error: openssl/bio.h: No such file or directory
ssl.c:32: error: syntax error before '*' token


From the ssl.c file. (* I added the line numbers*)
24 #ifdef VSF_BUILD_SSL
25
26 #include <openssl/ssl.h>
27 #include <openssl/err.h>
28 #include <openssl/rand.h>
29 #include <openssl/bio.h>
30
31 static char* get_ssl_error();
32 static SSL* get_ssl(struct vsf_session* p_sess, int fd);
33 static int ssl_session_init(struct vsf_session* p_sess);
 
Old 02-24-2006, 06:02 AM   #2
abisko00
Senior Member
 
Registered: Mar 2004
Location: Munich
Distribution: Ubuntu
Posts: 3,517

Rep: Reputation: 58
Can't you use the openssl rpm package? Installing this and the respective devel package should help.

Otherwise, have a look at ./configure --help if there's a prefix option to point to the openssl directory.
 
Old 02-24-2006, 04:50 PM   #3
todman
LQ Newbie
 
Registered: Nov 2004
Distribution: Suse 10.0
Posts: 4

Original Poster
Rep: Reputation: 0
I did not use a rpm package for vsftpd. The default rpm equivalent for vsftpd does not support ssl. The instructions say to recompile it with the ssl flag enabled. That's what I am now trying to do.
To get the make to work I figured I had to have the source for openssl.
I downloaded the tar for openssl.
It came with clear easy instructions.
unpack the tar
run ./config
make
make test
make install.

It ran without a problem.

The vsftpd process did not work as cleanly.
There is no config that I can find.
The make does all the work.
The make calls a shell script vsf_findlibs.sh to try and locate libraries but does not include much for ssl.

Being new to Unix I'm not sure what to do to solve this.

I tried changing the path to include the openssl but this did not work.
I then changed the actual #include lines in the vsftpd file that complained in ssl.c.
This caused a whole lot more errors.
It appears the openssl file that was included is now generating errors because it can't find files it needs. Thus ssl.h also includes files that can't be found.
Here's the newer errors.

...
gcc -c access.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c features.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c readwrite.c -O2 -Wall -W -Wshadow -idirafter dummyinc
gcc -c ssl.c -O2 -Wall -W -Wshadow -idirafter dummyinc
In file included from ssl.c:26:
/usr/local/ssl/include/openssl/ssl.h:173:27:
error: openssl/e_os2.h: No such file or directory
/usr/local/ssl/include/openssl/ssl.h:176:26:
error: openssl/comp.h: No such file or directory
/usr/local/ssl/include/openssl/ssl.h:179:25:
error: openssl/bio.h: No such file or directory
/usr/local/ssl/include/openssl/ssl.h:183:26:
error: openssl/x509.h: No such file or directory
/usr/local/ssl/include/openssl/ssl.h:185:28:
error: openssl/crypto.h: No such file or directory
/usr/local/ssl/include/openssl/ssl.h:186:27:
error: openssl/lhash.h: No such file or directory
/usr/local/ssl/include/openssl/ssl.h:187:28:
error: openssl/buffer.h: No such file or directory
/usr/local/ssl/include/openssl/ssl.h:189:25:
error: openssl/pem.h: No such file or directory
/usr/local/ssl/include/openssl/ssl.h:191:26:
error: openssl/kssl.h: No such file or directory
/usr/local/ssl/include/openssl/ssl.h:192:31:
error: openssl/safestack.h: No such file or directory
/usr/local/ssl/include/openssl/ssl.h:193:30:
error: openssl/symhacks.h: No such file or directory
In file included from ssl.c:26:
....
 
Old 02-25-2006, 09:07 AM   #4
abisko00
Senior Member
 
Registered: Mar 2004
Location: Munich
Distribution: Ubuntu
Posts: 3,517

Rep: Reputation: 58
I doubt that you need the sources of openssl to compile vsftpd. Have a try with the openssl-devel package!

If you can find a rpm package for vsftpd, there will be a src.rpm package as well. You can modify the configuration and recompile this package to get an rpm with ssl enabled. Should be more reliable than compilation from source.

How about my previous suggestion to run ./configure with a prefix?
 
Old 02-28-2006, 11:01 AM   #5
todman
LQ Newbie
 
Registered: Nov 2004
Distribution: Suse 10.0
Posts: 4

Original Poster
Rep: Reputation: 0
Unhappy

Thanks for your suggestions and taking the time to help someone new to Linux.
I believe the solution will be simple however my lack of experience with linux, rpm, compiles and installs is making this difficult for me.

Your ./configuration suggestion is possibly the right way to go.

However I still have some questions.

If I try and recompile with a change in the configuration do I need to uninstall the existing openssl that is installed?

Considering 3 possible ways to move forward.

1. Use a modified configuration setting.
for instance the openssl install suggests this.
./config --openssldir=/usr/local/openssl --prefix=/usr/local

However in Building Linux From scratch they suggest something else.
This suggestion was related to building in patch fixes to openssl
however I figure it could be used to solve my make issues.
./config --openssldir=/etc/ssl --prefix=/usr/local share

If I do recompile with a ./config option which option should be used? Not sure how to decide if one is better than the other.

2. In the openssl install file they talk about a common way to run old and new programs that require openssl.

They talk about using the "openssl/" prefix; for example. #include <openssl/ssl.h>.
They suggest creating a directory "incl" that contains only a symbolic link named "openssl", which points to the "include" directory of OpenSSL.
For example, your application's Makefile might contain the
following rule, if OPENSSLDIR is a pathname (absolute or
relative) of the directory where OpenSSL resides:

incl/openssl:
-mkdir incl
cd $(OPENSSLDIR) # Check whether the directory really exists
-ln -s `cd $(OPENSSLDIR); pwd`/include incl/openssl

You will have to add "incl/openssl" to the dependencies
of those C files that include some OpenSSL header file.

Not sure how to do this. Where would I put the incl directory? Would it go under the /ect or under /usr? Does it matter?
What would I add to the make file of vsftpd? Is it:
incl/openssl:
-mkdir incl
cd $(OPENSSLDIR) # Check whether the directory really exists
-ln -s `cd $(OPENSSLDIR); pwd`/include incl/openssl


3. Include a line in the make file that directs vsftpd where to locate the openssl include files.
Where would this go in the make file? What is the exact command? Vsftpd make currently has
CFLAGS = -O2 -Wall -W -Wshadow #-pedantic -Werror -Wconversion
Do I just add "-I/usr/local/ssl/include/openssl" to the end of the CFLAGS command?

To compile an application that uses old filenames -- e.g.
"#include <ssl.h>" --, it will usually be enough to find
the CFLAGS definition in the application's Makefile and
add a C option such as
-I/usr/local/ssl/include/openssl

Thanks for your time and thoughts.

Last edited by todman; 03-01-2006 at 07:52 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vsftpd & "553 could not create file" steffentchr Linux - Server 8 06-28-2012 01:52 PM
Constant errors during "make" or "make install" with SUSE 10.1 Alpha 4 TehFlyingDutchman Linux - Software 3 12-30-2005 06:25 PM
VSFTPD Debian VSFTPD "unrecognised variable in config file" DCT Linux - Software 0 05-29-2004 11:59 PM
Compile errors "can't create executable"! bruno buys Conectiva 5 12-11-2003 11:21 AM
snort compile errors "C compiler cannot create executables" RKris Linux - Software 2 11-07-2003 02:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 08:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration