Hello,
I've tried to install instiki multiple times without success and being new to Ruby, I am not experienced enough to decipher the 'mkmf.log', so I'd be grateful for some help. Before getting into the issue (iconv failed to compile), I have the following questions and comments:
!) On a Windows system, is there any practical difference between using "ruby bundle" and "ruby bundle install --path vendor/bundle"?
2) The instructions don't explicitly say that you must use the GitHub command shell when executing these commands {which might be helpful to note).
3) The instructions at 'github.com/parasew/instiki' are out of sync with those at 'https://golem.ph.utexas.edu/wiki/instiki/show/Installation' (the former states that Ruby 1.9.3 to 2.3 works, while the latter says Ruby 1.8.7 to 2.1).
4) While attempting to sign up to post to the forums at 'https://golem.ph.utexas.edu/forum/forums/instiki;, the page said I would receive an email with a link, but I never did (and no, it didn't go into my spam directory; I also checked using my 'back button' to verify that my email address was correct (which it was). I was using Firefox in 'Private Browing' mode... is this perhaps the issue?
On to my problem (I have DevKit installed and there are no spaces in the path names to either Ruby or instiki):
This is the output of "ruby bundle":
Windows PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.
C:\Users\BIA\Documents\GitHub> cd
C:> cd Instiki
C:\Instiki> ruby bundle
Fetching git://github.com/distler/maruku.git
Checking out files: 100% (280/280), done.
Fetching gem metadata from http://rubygems.org/........
Fetching version metadata from http://rubygems.org/..
Resolving dependencies...
Installing rake 10.4.2
Installing RedCloth 4.3.2 with native extensions
Installing abstract 1.0.0
Installing daemons 1.2.4
Installing erubis 2.7.0
Installing eventmachine 1.2.3
Installing file_signature 1.2.0
Installing iconv 1.0.4 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: C:/Instiki/vendor/bundle/ruby/2.3.0/gems/iconv-1.0.4/ext/iconv
C:/Ruby23/bin/ruby.exe -r ./siteconf20170309-10940-igd9ro.rb extconf.rb
checking for rb_enc_get() in ruby/encoding.h... yes
checking for rb_sys_fail_str() in ruby.h... yes
checking for iconv() in iconv.h... no
checking for iconv() in -liconv... 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
--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=.
--curdir
--ruby=C:/Ruby23/bin/$(RUBY_BASE_NAME)
--with-iconv-dir
--without-iconv-dir
--with-iconv-include
--without-iconv-include=${iconv-dir}/include
--with-iconv-lib
--without-iconv-lib=${iconv-dir}/lib
--enable-config-charset
--disable-config-charset
--with-config-charset
--without-config-charset
--with-iconvlib
--without-iconvlib
To see why this extension failed to compile, please check the mkmf.log which can be found here:
C:/Instiki/vendor/bundle/ruby/2.3.0/extensions/x86-mingw32/2.3.0/iconv-1.0.4/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in C:/Instiki/vendor/bundle/ruby/2.3.0/gems/iconv-1.0.4 for inspection.
Results logged to C:/Instiki/vendor/bundle/ruby/2.3.0/extensions/x86-mingw32/2.3.0/iconv-1.0.4/gem_make.out
Installing itextomml 1.5.5 with native extensions
Installing json 2.0.3 with native extensions
Installing mini_portile2 2.1.0
Installing syntax 1.1.0
Installing rack 1.4.5
Installing rails_xss 0.4.0
Installing rdoc 5.1.0
Installing rubyzip 0.9.9
Installing sqlite3 1.3.13
Installing test-unit 2.5.5
Using bundler 1.11.2
An error occurred while installing iconv (1.0.4), and Bundler cannot continue.
Make sure that gem install iconv -v '1.0.4'
succeeds before bundling.
This is the output of "ruby bundle install --path vendor/bundle":
C:\Instiki> ruby bundle install --path vendor/bundle
Fetching git://github.com/distler/maruku.git
Fetching gem metadata from http://rubygems.org/........
Fetching version metadata from http://rubygems.org/..
Resolving dependencies...
Using rake 10.4.2
Using RedCloth 4.3.2
Using abstract 1.0.0
Using daemons 1.2.4
Using erubis 2.7.0
Using eventmachine 1.2.3
Using file_signature 1.2.0
Installing iconv 1.0.4 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: C:/Instiki/vendor/bundle/ruby/2.3.0/gems/iconv-1.0.4/ext/iconv
C:/Ruby23/bin/ruby.exe -r ./siteconf20170309-1956-i8n98z.rb extconf.rb
checking for rb_enc_get() in ruby/encoding.h... yes
checking for rb_sys_fail_str() in ruby.h... yes
checking for iconv() in iconv.h... no
checking for iconv() in -liconv... 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
--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=.
--curdir
--ruby=C:/Ruby23/bin/$(RUBY_BASE_NAME)
--with-iconv-dir
--without-iconv-dir
--with-iconv-include
--without-iconv-include=${iconv-dir}/include
--with-iconv-lib
--without-iconv-lib=${iconv-dir}/lib
--enable-config-charset
--disable-config-charset
--with-config-charset
--without-config-charset
--with-iconvlib
--without-iconvlib
To see why this extension failed to compile, please check the mkmf.log which can be found here:
C:/Instiki/vendor/bundle/ruby/2.3.0/extensions/x86-mingw32/2.3.0/iconv-1.0.4/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in C:/Instiki/vendor/bundle/ruby/2.3.0/gems/iconv-1.0.4 for inspection.
Results logged to C:/Instiki/vendor/bundle/ruby/2.3.0/extensions/x86-mingw32/2.3.0/iconv-1.0.4/gem_make.out
Using itextomml 1.5.5
Using json 2.0.3
Using mini_portile2 2.1.0
Using syntax 1.1.0
Using rack 1.4.5
Using rails_xss 0.4.0
Using rdoc 5.1.0
Using rubyzip 0.9.9
Using sqlite3 1.3.13
Using test-unit 2.5.5
Using bundler 1.11.2
An error occurred while installing iconv (1.0.4), and Bundler cannot continue.
Make sure that gem install iconv -v '1.0.4'
succeeds before bundling.
C:\Instiki>
This is my "mkmf.log":
have_func: checking for rb_enc_get() in ruby/encoding.h... -------------------- yes
"gcc -o conftest.exe -IC:/Ruby23/include/ruby-2.3.0/i386-mingw32 -IC:/Ruby23/include/ruby-2.3.0/ruby/backward -IC:/Ruby23/include/ruby-2.3.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-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat conftest.c -L. -LC:/Ruby23/lib -L. -lmsvcrt-ruby230 -lshell32 -lws2_32 -liphlpapi -limagehlp -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:/Ruby23/include/ruby-2.3.0/i386-mingw32 -IC:/Ruby23/include/ruby-2.3.0/ruby/backward -IC:/Ruby23/include/ruby-2.3.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-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat conftest.c -L. -LC:/Ruby23/lib -L. -lmsvcrt-ruby230 -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5: #include <ruby/encoding.h>
6:
7: /top/
8: extern int t(void);
9: int main(int argc, char *argv)
10: {
11: if (argc > 1000000) {
12: printf("%p", &t);
13: }
14:
15: return 0;
16: }
17: int t(void) { void ((volatile p)()); p = (void (()()))rb_enc_get; return !p; }
/ end */
have_func: checking for rb_sys_fail_str() in ruby.h... -------------------- yes
"gcc -o conftest.exe -IC:/Ruby23/include/ruby-2.3.0/i386-mingw32 -IC:/Ruby23/include/ruby-2.3.0/ruby/backward -IC:/Ruby23/include/ruby-2.3.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-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat conftest.c -L. -LC:/Ruby23/lib -L. -lmsvcrt-ruby230 -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5: #include <ruby.h>
6:
7: /top/
8: extern int t(void);
9: int main(int argc, char *argv)
10: {
11: if (argc > 1000000) {
12: printf("%p", &t);
13: }
14:
15: return 0;
16: }
17: int t(void) { void ((volatile p)()); p = (void (()()))rb_sys_fail_str; return !p; }
/ end */
have_func: checking for iconv() in iconv.h... -------------------- no
"gcc -o conftest.exe -IC:/Ruby23/include/ruby-2.3.0/i386-mingw32 -IC:/Ruby23/include/ruby-2.3.0/ruby/backward -IC:/Ruby23/include/ruby-2.3.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-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat conftest.c -L. -LC:/Ruby23/lib -L. -lmsvcrt-ruby230 -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi "
conftest.c:5:19: fatal error: iconv.h: No such file or directory
compilation terminated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5: #include <iconv.h>
6:
7: /top/
8: extern int t(void);
9: int main(int argc, char *argv)
10: {
11: if (argc > 1000000) {
12: printf("%p", &t);
13: }
14:
15: return 0;
16: }
17: int t(void) { void ((volatile p)()); p = (void (()()))iconv; return !p; }
/ end */
"gcc -o conftest.exe -IC:/Ruby23/include/ruby-2.3.0/i386-mingw32 -IC:/Ruby23/include/ruby-2.3.0/ruby/backward -IC:/Ruby23/include/ruby-2.3.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-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat conftest.c -L. -LC:/Ruby23/lib -L. -lmsvcrt-ruby230 -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi "
conftest.c:5:19: fatal error: iconv.h: No such file or directory
compilation terminated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5: #include <iconv.h>
6:
7: /top/
8: extern int t(void);
9: int main(int argc, char *argv)
10: {
11: if (argc > 1000000) {
12: printf("%p", &t);
13: }
14:
15: return 0;
16: }
17: extern void iconv();
18: int t(void) { iconv(); return 0; }
/ end */
have_library: checking for iconv() in -liconv... -------------------- no
"gcc -o conftest.exe -IC:/Ruby23/include/ruby-2.3.0/i386-mingw32 -IC:/Ruby23/include/ruby-2.3.0/ruby/backward -IC:/Ruby23/include/ruby-2.3.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-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat conftest.c -L. -LC:/Ruby23/lib -L. -lmsvcrt-ruby230 -liconv -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi "
conftest.c:5:19: fatal error: iconv.h: No such file or directory
compilation terminated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5: #include <iconv.h>
6:
7: /top/
8: extern int t(void);
9: int main(int argc, char *argv)
10: {
11: if (argc > 1000000) {
12: printf("%p", &t);
13: }
14:
15: return 0;
16: }
17: int t(void) { void ((volatile p)()); p = (void (()()))iconv; return !p; }
/ end */
"gcc -o conftest.exe -IC:/Ruby23/include/ruby-2.3.0/i386-mingw32 -IC:/Ruby23/include/ruby-2.3.0/ruby/backward -IC:/Ruby23/include/ruby-2.3.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-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat conftest.c -L. -LC:/Ruby23/lib -L. -lmsvcrt-ruby230 -liconv -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi "
conftest.c:5:19: fatal error: iconv.h: No such file or directory
compilation terminated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <winsock2.h>
4: #include <windows.h>
5: #include <iconv.h>
6:
7: /top/
8: extern int t(void);
9: int main(int argc, char *argv)
10: {
11: if (argc > 1000000) {
12: printf("%p", &t);
13: }
14:
15: return 0;
16: }
17: extern void iconv();
18: int t(void) { iconv(); return 0; }
/ end */
This is my "extconf.rb" (\instiki\vendor\bundle\ruby\2.3.0\gems\iconv-1.0.4\ext):
require 'mkmf'
dir_config("iconv")
conf = File.exist?(File.join($srcdir, "config.charset"))
conf = with_config("config-charset", enable_config("config-charset", conf))
unless have_func("rb_enc_get", "ruby/encoding.h") || have_func("vasprintf", "stdio.h")
raise "vasprintf is required for Ruby 1.8"
end
have_func("rb_sys_fail_str", "ruby.h")
if have_func("iconv", "iconv.h") or
have_library("iconv", "iconv", "iconv.h")
check_signedness("size_t") rescue nil
if checking_for("const of iconv() 2nd argument") do
create_tmpsrc(cpp_include("iconv.h") + "---> iconv(cd,0,0,0,0) <---")
src = xpopen(cpp_command("")) {|f|f.read}
if !(func = src[/^--->\s*(\w+).\s<---/, 1])
Logging::message "iconv function name not found"
false
elsif !(second = src[%r"\b#{func}\s*(.?,(.?),.?)\s;"m, 1])
Logging::message "prototype for #{func}() not found"
false
else
Logging::message $&+"\n"
/\bconst\b/ =~ second
end
end
$defs.push('-DICONV_INPTR_CONST')
end
have_func("iconvlist", "iconv.h")
have_func("__iconv_free_list", "iconv.h")
if conf
prefix = '$(srcdir)'
prefix = $nmake ? "{#{prefix}}" : "#{prefix}/"
if $extout
wrapper = "$(RUBYARCHDIR)/iconv.rb"
else
wrapper = "./iconv.rb"
$INSTALLFILES = [[wrapper, "$(RUBYARCHDIR)"]]
end
if String === conf
require 'uri'
scheme = URI.parse(conf).scheme
else
conf = "$(srcdir)/config.charset"
end
$cleanfiles << wrapper
end
create_makefile("iconv/iconv")
if conf
open("Makefile", "a") do |mf|
mf.print("\nall: #{wrapper}\n\n#{wrapper}: #{prefix}charset_alias.rb")
mf.print(" ", conf) unless scheme
mf.print("\n\t$(RUBY) $(srcdir)/charset_alias.rb #{conf} $@\n")
end
end
end
Any help would be greatly appreciated. Thank you.