Results 1 to 3 of 3
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. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 02-23-2006 #1Just Joined!
- Join Date
- Feb 2006
- Posts
- 2
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.
I added /usr/local/ssl/include/openssl to the path and the errors did not change.
Could someone please suggest a solution for this.
Thanks.
Tkman
A chunk of the output after the make:
....
ipaddrparse.c: In function 'vsf_sysutil_parse_ipv6':
ipaddrparse.c:58: warning: pointer targets in return differ in signedness
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
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
ssl.c:32: warning: type defaults to 'int' in declaration of 'get_ssl'
....
From the ssl.c file. ( I added the line numbers at line 24.)
/*
* Part of Very Secure FTPd
* Licence: GPL v2. Note that this code interfaces with with the OpenSSL
* libraries, so please read LICENSE where I give explicit permission to link
* against the OpenSSL libraries.
* Author: Chris Evans
* ssl.c
*
* Routines to handle a SSL/TLS-based implementation of RFC 2228, i.e.
* encryption.
*/
#include "ssl.h"
#include "session.h"
#include "ftpcodes.h"
#include "ftpcmdio.h"
#include "defs.h"
#include "str.h"
#include "sysutil.h"
#include "tunables.h"
#include "utility.h"
#include "builddefs.h"
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
31static char* get_ssl_error();
32static SSL* get_ssl(struct vsf_session* p_sess, int fd);
33static int ssl_session_init(struct vsf_session* p_sess);
static void setup_bio_callbacks();
static long bio_callback(
BIO* p_bio, int oper, const char* p_arg, int argi, long argl, long retval);
static int ssl_inited;
....
- 02-28-2006 #2
I think you just need to add '/usr/local/ssl/include' to your INCLUDE environment variable, or add it in the makefile where include directories are defined. You suggest you've added this to your PATH, which is not searched for includes.
Linux user #126863 - see http://linuxcounter.net/
- 02-28-2006 #3Just Joined!
- Join Date
- Feb 2006
- Posts
- 2
I added the explicit path in the include and also added it to the path.
I changed the actual #include lines in the vsftpd file that complained ie. 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
Thus this type of change is likely the Brute force and ignorance BFI method.
I suspect I need to add a config parameter that redirects the output of the openssl build, or make a change to the make file for vsftpd to look in the openssl directory, or create a symbolic link to the openssl include files.
Now the question is how to do this.
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?
From the openssl install file they suggest:
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.


Reply With Quote
