Install Puma on Windows - Extconf.rb failed

1,066 views
Skip to first unread message

Toujours

unread,
Mar 18, 2015, 4:33:33 PM3/18/15
to rubyin...@googlegroups.com
Hi.


I have tried to install Puma on Windows 8.1 but I have problem to install. I try to use heroku for one project student. All the times when I try to install, reports for me: extconf.rb failed. Below I show all the logs:

Cmd:

C:\ruby\bin>gem install puma -- --with-opt-dir=C:/openssl
Temporarily enhancing PATH to include DevKit...
Building native extensions with: '--with-opt-dir=C:/
openssl'
This could take a while...
ERROR:  Error installing puma:
        ERROR: Failed to build gem native extension.

    C:/ruby/bin/ruby.exe -r ./siteconf20150318-18280-1f8rjbr.rb extconf.rb --wit
h-opt-dir=C:/openssl
checking for BIO_read() in -lcrypto... no
checking for BIO_read() in -llibeay32... no
*** 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
        --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=.
        --curdir
        --ruby=C:/ruby/bin/ruby
        --with-puma_http11-dir
        --without-puma_http11-dir
        --with-puma_http11-include
        --without-puma_http11-include=${puma_http11-dir}/include
        --with-puma_http11-lib
        --without-puma_http11-lib=${puma_http11-dir}/
        --with-cryptolib
        --without-cryptolib
        --with-libeay32lib
        --without-libeay32lib

extconf failed, exit code 1

Gem files will remain installed in C:/ruby/lib/ruby/gems/2.0.0/gems/puma-2.11.1
for inspection.
Results logged to C:/ruby/lib/ruby/gems/2.0.0/extensions/x64-mingw32/2.0.0/puma-
2.11.1/gem_make.out



Gem_make.out:


C:/ruby/bin/ruby.exe -r ./siteconf20150318-18280-1f8rjbr.rb extconf.rb --with-opt-dir=C:/openssl
checking for BIO_read() in -lcrypto... no
checking for BIO_read() in -llibeay32... no
*** 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
   
--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=.
   
--curdir
   
--ruby=C:/ruby/bin/ruby
   
--with-puma_http11-dir
   
--without-puma_http11-dir
   
--with-puma_http11-include
   
--without-puma_http11-include=${puma_http11-dir}/include
   
--with-puma_http11-lib
   
--without-puma_http11-lib=${puma_http11-dir}/
   
--with-cryptolib
   
--without-cryptolib
   
--with-libeay32lib
   
--without-libeay32lib

extconf failed
, exit code 1



I replace the libs, Reinstall all the app (rubyinstaller, devkit, openssl) older and lastest versions. Nothing solved my problem.

I already google but I don't find answers for my problem. If anybody helps me, I will be appreciated.

Thanks.

Cecil Coupe

unread,
Mar 18, 2015, 4:45:15 PM3/18/15
to rubyin...@googlegroups.com
I've found that looking at the mkmf.log can be useful when extconf.rb fails.  You also configure both with and without cryptolib and libeasy32lib. You probably want the with not the without.

Hope this helps
--Cecil

I already google but I don't find answers for my problem. If anybody helps me, I will be appreciated.

Thanks.
--
You received this message because you are subscribed to the Google Groups "RubyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyinstalle...@googlegroups.com.
To post to this group, send email to rubyin...@googlegroups.com.
Visit this group at http://groups.google.com/group/rubyinstaller.
For more options, visit https://groups.google.com/d/optout.

Dušan D. Majkić

unread,
Mar 18, 2015, 7:20:14 PM3/18/15
to rubyin...@googlegroups.com
> C:/ruby/lib/ruby/gems/2.0.0/extensions/x64-mingw32/2.0.0/puma-
> 2.11.1/gem_make.out

It looks like you are using 64bit ruby. Use 32bit version of ruby.

Toujours

unread,
Mar 19, 2015, 1:07:35 AM3/19/15
to rubyin...@googlegroups.com
My problem still happen.

I did the same things but set 64 to 32 bits. When I try to install the puma, show the same error.

Now, I post too the mkmf.log. In the first line said. I don't know how to fix it


have_library
: checking for BIO_read() in -lcrypto... -------------------- no

"gcc -o conftest.exe -IC:/ruby/include/ruby-2.2.0/i386-mingw32 -IC:/ruby/include
/ruby-2.2.0/ruby/backward -IC:/ruby/include/ruby-2.2.0 -I. -DFD_SETSIZE=2048 -D_
WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64   -O3 -fno
-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-p
arentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpo
inter-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-de
claration -Wdeprecated-declarations -Wno-packed-bitfield-compat conftest.c  -L.
-LC:/ruby/lib -L.      -lmsvcrt-ruby220  -lshell32 -lws2_32 -liphlpapi -limagehl
p -lshlwapi  "

checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5: int main(int argc, char **argv)
6: {
7:   return 0;
8: }
/* end */

"gcc -o conftest.exe -IC:/ruby/include/ruby-2.2.0/i386-mingw32 -IC:/ruby/include
/ruby-2.2.0/ruby/backward -IC:/ruby/include/ruby-2.2.0 -I. -DFD_SETSIZE=2048 -D_
WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64   -O3 -fno
-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-p
arentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpo
inter-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-de
claration -Wdeprecated-declarations -Wno-packed-bitfield-compat conftest.c  -L.
-LC:/ruby/lib -L.      -lmsvcrt-ruby220 -lcrypto  -lshell32 -lws2_32 -liphlpapi
-limagehlp -lshlwapi  "

conftest
.c: In function 't':
conftest
.c:16:57: error: 'BIO_read' undeclared (first use in this function)
conftest
.c:16:57: note: each undeclared identifier is reported only once for eac
h
function it appears in
conftest
.c:16:32: warning: variable 'p' set but not used [-Wunused-but-set-varia
ble
]
checked program was:
/* begin */
 
1: #include "ruby.h"
 
2:
 
3: #include <winsock2.h>
 
4: #include <windows.h>
 
5:
 
6: /*top*/
 
7: extern int t(void);
 
8: int main(int argc, char **argv)
 
9: {
10:   if (argc > 1000000) {
11:     printf("%p", &t);
12:   }
13:
14:   return 0;
15: }
16: int t(void) { void ((*volatile p)()); p = (void ((*)()))BIO_read; return 0;
}
/* end */

"gcc -o conftest.exe -IC:/ruby/include/ruby-2.2.0/i386-mingw32 -IC:/ruby/include
/ruby-2.2.0/ruby/backward -IC:/ruby/include/ruby-2.2.0 -I. -DFD_SETSIZE=2048 -D_
WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64   -O3 -fno
-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-p
arentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpo
inter-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-de
claration -Wdeprecated-declarations -Wno-packed-bitfield-compat conftest.c  -L.
-LC:/ruby/lib -L.      -lmsvcrt-ruby220 -lcrypto  -lshell32 -lws2_32 -liphlpapi
-limagehlp -lshlwapi  "

conftest
.c: In function 't':
conftest
.c:16:1: warning: implicit declaration of function 'BIO_read' [-Wimplici
t
-function-declaration]
c
:/ruby/devkit/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-
mingw32
/bin/ld.exe: cannot find -lcrypto
collect2
.exe: error: ld returned 1 exit status
checked program was:
/* begin */
 
1: #include "ruby.h"
 
2:
 
3: #include <winsock2.h>
 
4: #include <windows.h>
 
5:
 
6: /*top*/
 
7: extern int t(void);
 
8: int main(int argc, char **argv)
 
9: {
10:   if (argc > 1000000) {
11:     printf("%p", &t);
12:   }
13:
14:   return 0;
15: }
16: int t(void) { BIO_read(); return 0; }
/* end */

--------------------

have_library
: checking for BIO_read() in -llibeay32... -------------------- no

"gcc -o conftest.exe -IC:/ruby/include/ruby-2.2.0/i386-mingw32 -IC:/ruby/include
/ruby-2.2.0/ruby/backward -IC:/ruby/include/ruby-2.2.0 -I. -DFD_SETSIZE=2048 -D_
WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64   -O3 -fno
-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-p
arentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpo
inter-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-de
claration -Wdeprecated-declarations -Wno-packed-bitfield-compat conftest.c  -L.
-LC:/ruby/lib -L.      -lmsvcrt-ruby220 -llibeay32  -lshell32 -lws2_32 -liphlpap
i -limagehlp -lshlwapi  "

conftest
.c: In function 't':
conftest
.c:16:57: error: 'BIO_read' undeclared (first use in this function)
conftest
.c:16:57: note: each undeclared identifier is reported only once for eac
h
function it appears in
conftest
.c:16:32: warning: variable 'p' set but not used [-Wunused-but-set-varia
ble
]
checked program was:
/* begin */
 
1: #include "ruby.h"
 
2:
 
3: #include <winsock2.h>
 
4: #include <windows.h>
 
5:
 
6: /*top*/
 
7: extern int t(void);
 
8: int main(int argc, char **argv)
 
9: {
10:   if (argc > 1000000) {
11:     printf("%p", &t);
12:   }
13:
14:   return 0;
15: }
16: int t(void) { void ((*volatile p)()); p = (void ((*)()))BIO_read; return 0;
}
/* end */

"gcc -o conftest.exe -IC:/ruby/include/ruby-2.2.0/i386-mingw32 -IC:/ruby/include
/ruby-2.2.0/ruby/backward -IC:/ruby/include/ruby-2.2.0 -I. -DFD_SETSIZE=2048 -D_
WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64   -O3 -fno
-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-p
arentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpo
inter-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-de
claration -Wdeprecated-declarations -Wno-packed-bitfield-compat conftest.c  -L.
-LC:/ruby/lib -L.      -lmsvcrt-ruby220 -llibeay32  -lshell32 -lws2_32 -liphlpap
i -limagehlp -lshlwapi  "

conftest
.c: In function 't':
conftest
.c:16:1: warning: implicit declaration of function 'BIO_read' [-Wimplici
t
-function-declaration]
c
:/ruby/devkit/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-
mingw32
/bin/ld.exe: cannot find -llibeay32
collect2
.exe: error: ld returned 1 exit status
checked program was:
/* begin */
 
1: #include "ruby.h"
 
2:
 
3: #include <winsock2.h>
 
4: #include <windows.h>
 
5:
 
6: /*top*/
 
7: extern int t(void);
 
8: int main(int argc, char **argv)
 
9: {
10:   if (argc > 1000000) {
11:     printf("%p", &t);
12:   }
13:
14:   return 0;
15: }
16: int t(void) { BIO_read(); return 0; }
/* end */

--------------------




Thanks for help me. I hope to fix this.



Em quarta-feira, 18 de março de 2015 17:45:15 UTC-3, Cecil Coupe escreveu:


Cecil Coupe

unread,
Mar 19, 2015, 3:00:10 AM3/19/15
to rubyin...@googlegroups.com
It fails to 'gem install puma' on my win7 system with the same error messages as yours.
Do you know if puma gem works on any Windows system? I'm guessing no.  Perhaps you should file a bug report at puma.io

Can you use jRuby instead? Or pick a different webserver if it's a student project.

Dušan D. Majkić

unread,
Mar 19, 2015, 6:06:47 AM3/19/15
to rubyin...@googlegroups.com
This is how I did it.

* ruby 2.2.1 x86 32bit version from rubyinstaler.org site
* Devkit 4.7.2 32bit form rubyinstaller.org site this one:
http://dl.bintray.com/oneclick/rubyinstaller/DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe?direct
* openssl from http://packages.openknapsack.org/openssl/openssl-1.0.0k-x86-windows.tar.lzma

Ruby unpacked to C:\ruby, DevKit unpacked to C:\devkit, C:\ruby\bin
added to path.
Unpack openssl-1.0.0k-x86-windows.tar.lzma to C:\openssl

Open console (run cmd.exe)
Run: C:\devkit\devkitvars.bat
Run: gem install puma -- --with-opt-dir=c:\openssl

If ruby 2.2.1 doesn't work, try with ruby 2.1.5 32bit.

Gustavo Andrade

unread,
Mar 19, 2015, 9:06:50 AM3/19/15
to rubyin...@googlegroups.com
Cecil.


Actually, I try to install puma because in heroku needs to install to work. I have a old computer and for me runs webapp will be a problem and I need a plataform to upload my project and run properly. Maybe when here in my country the computer will be more cheap.


If you know other platform free to run ruby app on web, I will be appreciate. I noob but now I need to work with ruby on rails.


Thanks.

--
You received this message because you are subscribed to a topic in the Google Groups "RubyInstaller" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rubyinstaller/RkBqA6DsGl0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rubyinstalle...@googlegroups.com.

To post to this group, send email to rubyin...@googlegroups.com.
Visit this group at http://groups.google.com/group/rubyinstaller.
For more options, visit https://groups.google.com/d/optout.



--
Gustavo - 92787884

Gustavo Andrade

unread,
Mar 19, 2015, 9:11:00 AM3/19/15
to rubyin...@googlegroups.com
Dusan,


I did the same thing you said to do but its happen the same error.


Do you know more anything to do for try to solve this problem?


Thanks.



--
You received this message because you are subscribed to a topic in the Google Groups "RubyInstaller" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rubyinstaller/RkBqA6DsGl0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rubyinstalle...@googlegroups.com.

To post to this group, send email to rubyin...@googlegroups.com.
Visit this group at http://groups.google.com/group/rubyinstaller.
For more options, visit https://groups.google.com/d/optout.



--
Gustavo - 92787884

Bahati Wanza

unread,
Jul 7, 2015, 7:17:00 AM7/7/15
to rubyin...@googlegroups.com
This worked for me on Windows 8.1. Thanks a bunch!!!
Reply all
Reply to author
Forward
0 new messages