Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buildng for Windows #7

Open
pbcole opened this issue Apr 2, 2015 · 10 comments
Open

Buildng for Windows #7

pbcole opened this issue Apr 2, 2015 · 10 comments

Comments

@pbcole
Copy link

pbcole commented Apr 2, 2015

Hi,

I'm trying to get rkerberos to build on Windows 7, so far without any luck.
I have the krb5-1.13.1 from MIT built and installed.
When I try to run either "gem install rkerberos", or rake test in the gems directory, I get:

--- 8< ---
z:\exe\Ruby21-x64\lib\ruby\gems\2.1.0\gems\rkerberos-0.1.3>rake test
Failed to remove tmp/x64-mingw32/stage: No such file or directory @ unlink_inter
nal - tmp/x64-mingw32/stage
Failed to remove tmp/x64-mingw32/rkerberos/2.1.5/mkmf.log: No such file or direc
tory @ unlink_internal - tmp/x64-mingw32/rkerberos/2.1.5/mkmf.log
mkdir -p tmp/x64-mingw32/rkerberos/2.1.5
cd tmp/x64-mingw32/rkerberos/2.1.5
z:/exe/Ruby21-x64/bin/ruby.exe -I. ../../../../ext/rkerberos/extconf.rb
checking for krb5.h... no
checking for main() in -lkrb5... no
warning: com_err not found, usually a dependency for kadm5clnt
checking for kadm5/admin.h... no
*** ../../../../ext/rkerberos/extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=../../../../ext/rkerberos
--curdir
--ruby=z:/exe/Ruby21-x64/bin/ruby
--with-rkerberos-dir
--without-rkerberos-dir
--with-rkerberos-include
--without-rkerberos-include=${rkerberos-dir}/include
--with-rkerberos-lib
--without-rkerberos-lib=${rkerberos-dir}/lib
--with-krb5lib
--without-krb5lib
--with-com_err-config
--without-com_err-config
--with-pkg-config
--without-pkg-config
../../../../ext/rkerberos/extconf.rb:15:in `

': kadm5clnt library not found
(RuntimeError)
rake aborted!
Command failed with status (1): [z:/exe/Ruby21-x64/bin/ruby.exe -I. ../../....]

Tasks: TOP => test => test:all => compile => compile:x64-mingw32 => compile:rker
beros:x64-mingw32 => copy:rkerberos:x64-mingw32:2.1.5 => tmp/x64-mingw32/rkerber
os/2.1.5/rkerberos.so => tmp/x64-mingw32/rkerberos/2.1.5/Makefile
(See full trace by running task with --trace)

--- >8 ---

Any sugestions?

I'm not very familiar with ruby, so apologies if I'm missing anything really obvious.

Regards

Phil

@djberg96
Copy link
Collaborator

djberg96 commented Apr 2, 2015

If you have the gem installed, then you don't need to rebuild. You could just do "ruby -Iext test/*.rb" I think.

If you want to run the rake task, you'll have to pass the options that you passed on the command line to build rkerberos in the first place. So, something like "rake test -- --with-rkerberos-dir=C:/path/to/kerberos".

@pbcole
Copy link
Author

pbcole commented Apr 3, 2015

Hi,

Thanks for the reply. I'll take a look on Tuesday when I'm next back at
work.

I haven't yet been able to get the gem to install... as it's failing at
this step during installation. I'll see if I can get the command line
passed on the gem install line.

Cheers

Phil

Daniel Berger wrote on 02/04/15 19:56:

If you have the gem installed, then you don't need to rebuild. You
could just do "ruby -Iext test/*.rb" I think.

If you want to run the rake task, you'll have to pass the options that
you passed on the command line to build rkerberos in the first place.
So, something like "rake test --
--with-rkerberos-dir=C:/path/to/kerberos".


Reply to this email directly or view it on GitHub
#7 (comment).

@djberg96
Copy link
Collaborator

djberg96 commented Apr 3, 2015

Ah, it didn't successfully install. Ok, then try "gem install rkerberos -- --with-rkerberos-dir=C:/path/to/kerberos".

@djberg96
Copy link
Collaborator

djberg96 commented Apr 8, 2015

Any luck?

@pbcole
Copy link
Author

pbcole commented Apr 8, 2015

Sadly not... at least not yet.

I haven't been able to upload the logs to somewhere I can share with you

  • I'll have a go again at that tomorrow (the joys of restricted networks!)

I think the problem is that some parts of the kerberos codebase may not
be as cross-platform as one would like, so it ends up trying to look for
linux/unix headers on a windows system :(

Daniel Berger wrote on 08/04/15 16:05:

Any luck?


Reply to this email directly or view it on GitHub
#7 (comment).

@djberg96
Copy link
Collaborator

djberg96 commented Apr 8, 2015

The only includes in rkerberos are these:

#include <ruby.h>
#include <krb5.h>
#include <string.h>

#ifdef HAVE_KADM5_ADMIN_H
#include <kadm5/admin.h>
#endif

None of those are unix-specific, so I'm guessing it's something else. Anyway, we'll take a look at the logs once you post them and see what we can do to help.

@djberg96
Copy link
Collaborator

djberg96 commented Apr 8, 2015

Oh, nm, you mean within kerberos itself. Hm, could be, I don't think I ever tried to build it on Windows.

@djberg96
Copy link
Collaborator

djberg96 commented Apr 8, 2015

Just curious, did you build from source or use one of the kerberos installers? Because I noticed that the installer doesn't include the admin headers for some reason.

@pbcole
Copy link
Author

pbcole commented Apr 8, 2015

I built from source, so have all the libraries and header files available.

The problem is a header imported from kadm5/admin.h.
admin.h includes gssrpc/rpc.h
which includes netinet/in.h

which isn't available on Windows :(

Daniel Berger wrote on 08/04/15 19:36:

Just curious, did you build from source or use one of the kerberos
installers? Because I noticed that the installer doesn't include the
admin headers for some reason.


Reply to this email directly or view it on GitHub
#7 (comment).

@djberg96
Copy link
Collaborator

djberg96 commented Apr 8, 2015

Hmm, could be a bug in kerberos. What happens if you explicitly include winsock2.h in rpc.h before that line?

Edit: Or maybe substitute netinet/in.h with winsock2.h, can't remember now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants