Bug #1090

zlib doesn't load after installation

Added by Jérôme Bousquié about 3 years ago. Updated 9 months ago.

[ruby-core:21747]
Status:Rejected Start date:02/02/2009
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:-
Target version:-
ruby -v:1.9.1

Description

I've got two different platforms on i686 arch : ubuntu 8.10 (2.6.27-11-generic, gcc version 4.3.2) and debian etch under vserver (2.6.18-6-vserver-686, gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)), GNU Make 3.81 on both.
I get the same problem on both machines after installing : 

root@rubydev:~/ruby-1.9.1-p0# ruby -v
ruby 1.9.1p0 (2009-01-30 revision 21907) [i686-linux]
gem update
/usr/local/lib/ruby/1.9.1/rubygems/spec_fetcher.rb:1:in `require': no such file to load -- zlib (LoadError)
	from /usr/local/lib/ruby/1.9.1/rubygems/spec_fetcher.rb:1:in `<top (required)>'
	from /usr/local/lib/ruby/1.9.1/rubygems/commands/update_command.rb:5:in `require'
	from /usr/local/lib/ruby/1.9.1/rubygems/commands/update_command.rb:5:in `<top (required)>'
	from /usr/local/lib/ruby/1.9.1/rubygems/command_manager.rb:140:in `require'
	from /usr/local/lib/ruby/1.9.1/rubygems/command_manager.rb:140:in `rescue in load_and_instantiate'
	from /usr/local/lib/ruby/1.9.1/rubygems/command_manager.rb:132:in `load_and_instantiate'
	from /usr/local/lib/ruby/1.9.1/rubygems/command_manager.rb:65:in `[]'
	from /usr/local/lib/ruby/1.9.1/rubygems/command_manager.rb:118:in `find_command'
	from /usr/local/lib/ruby/1.9.1/rubygems/command_manager.rb:104:in `process_args'
	from /usr/local/lib/ruby/1.9.1/rubygems/command_manager.rb:75:in `run'
	from /usr/local/lib/ruby/1.9.1/rubygems/gem_runner.rb:39:in `run'
	from /usr/local/bin/gem:24:in `<main>'

I did ./configure --prefix=/usr/local
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking whether gcc needs -traditional... no
checking whether the linker is GNU ld... yes
checking whether gcc -E accepts -o... yes
checking for ranlib... ranlib
checking for ar... ar
checking for as... as
checking for objdump... objdump
checking for objcopy... objcopy
checking whether ln -s works... yes
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for long long... yes
checking for off_t... yes
checking size of int... 4
checking size of short... 2
checking size of long... 4
checking size of long long... 8
checking size of __int64... 0
checking size of off_t... 8
checking size of void*... 4
checking size of float... 4
checking size of double... 8
checking size of time_t... 4
checking for pid_t... yes
checking for convertible type of pid_t... LONG
checking for uid_t... yes
checking for convertible type of uid_t... ULONG
checking for gid_t... yes
checking for convertible type of gid_t... ULONG
checking for prototypes... yes
checking token paste string... ansi
checking stringization... #expr
checking string literal concatenation... yes
checking for variable length prototypes and stdarg.h... yes
checking for variable length macro... yes
checking for noreturn function attribute... __attribute__ ((noreturn)) x
checking for deprecated function attribute... __attribute__ ((deprecated)) x
checking for noinline function attribute... __attribute__ ((noinline)) x
checking for stdcall function attribute... __attribute__ ((stdcall)) x
checking for cdecl function attribute... __attribute__ ((cdecl)) x
checking for fastcall function attribute... __attribute__ ((fastcall)) x
checking for function alias... alias
checking for RUBY_EXTERN... no
checking whether sys_nerr is declared... yes
checking for crypt in -lcrypt... yes
checking for dlopen in -ldl... yes
checking for shl_load in -ldld... no
checking for socketpair in -lsocket... no
checking for clock_gettime in -lrt... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for sys/wait.h that is POSIX.1 compatible... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/syscall.h usability... yes
checking sys/syscall.h presence... yes
checking for sys/syscall.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking sys/fcntl.h usability... yes
checking sys/fcntl.h presence... yes
checking for sys/fcntl.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/times.h usability... yes
checking sys/times.h presence... yes
checking for sys/times.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking syscall.h usability... yes
checking syscall.h presence... yes
checking for syscall.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking a.out.h usability... yes
checking a.out.h presence... yes
checking for a.out.h... yes
checking utime.h usability... yes
checking utime.h presence... yes
checking for utime.h... yes
checking direct.h usability... no
checking direct.h presence... no
checking for direct.h... no
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking sys/mkdev.h usability... no
checking sys/mkdev.h presence... no
checking for sys/mkdev.h... no
checking sys/utime.h usability... no
checking sys/utime.h presence... no
checking for sys/utime.h... no
checking xti.h usability... no
checking xti.h presence... no
checking for xti.h... no
checking netinet/in_systm.h usability... yes
checking netinet/in_systm.h presence... yes
checking for netinet/in_systm.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking ieeefp.h usability... no
checking ieeefp.h presence... no
checking for ieeefp.h... no
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking ucontext.h usability... yes
checking ucontext.h presence... yes
checking for ucontext.h... yes
checking intrinsics.h usability... no
checking intrinsics.h presence... no
checking for intrinsics.h... no
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking sys/sendfile.h usability... yes
checking sys/sendfile.h presence... yes
checking for sys/sendfile.h... yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking for net/socket.h... (cached) no
checking for sys/socket.h... (cached) yes
checking size of rlim_t... 8
checking for size_t... yes
checking size of size_t... 4
checking size of ptrdiff_t... 4
checking for struct stat.st_blksize... yes
checking for struct stat.st_blocks... yes
checking for struct stat.st_rdev... yes
checking for struct stat.st_atim... yes
checking for struct stat.st_atimespec... no
checking for struct stat.st_atimensec... no
checking for struct stat.st_mtim... yes
checking for struct stat.st_mtimespec... no
checking for struct stat.st_mtimensec... no
checking for struct stat.st_ctim... yes
checking for struct stat.st_ctimespec... no
checking for struct stat.st_ctimensec... no
checking for struct timespec... yes
checking for fd_mask... yes
checking for int8_t... yes
checking for uint8_t... yes
checking for int16_t... yes
checking for uint16_t... yes
checking for int32_t... yes
checking for uint32_t... yes
checking for int64_t... yes
checking for uint64_t... yes
checking for int128_t... no
checking for uint128_t... no
checking for intptr_t... yes
checking for uintptr_t... yes
checking for ssize_t... yes
checking for stack end address... __libc_stack_end
checking for uid_t in sys/types.h... (cached) yes
checking type of array argument to getgroups... gid_t
checking return type of signal handlers... void
checking for working alloca.h... yes
checking for alloca... yes
checking for working memcmp... yes
checking for broken erfc of glibc-2.3.6 on IA64... no
checking for dup2... yes
checking for memmove... yes
checking for strerror... yes
checking for strchr... yes
checking for strstr... yes
checking for crypt... yes
checking for flock... yes
checking for vsnprintf... yes
checking for isnan... yes
checking for finite... yes
checking for isinf... yes
checking for hypot... yes
checking for acosh... yes
checking for erf... yes
checking for tgamma... yes
checking for lgamma_r... yes
checking for cbrt... yes
checking for strlcpy... no
checking for strlcat... no
checking for fmod... yes
checking for killpg... yes
checking for wait4... yes
checking for waitpid... yes
checking for fork... yes
checking for spawnv... no
checking for syscall... yes
checking for chroot... yes
checking for fsync... yes
checking for getcwd... yes
checking for eaccess... yes
checking for truncate... yes
checking for ftruncate... yes
checking for chsize... no
checking for times... yes
checking for utimes... yes
checking for utimensat... yes
checking for fcntl... yes
checking for lockf... yes
checking for lstat... yes
checking for link... yes
checking for symlink... yes
checking for readlink... yes
checking for setitimer... yes
checking for setruid... no
checking for seteuid... yes
checking for setreuid... yes
checking for setresuid... yes
checking for setproctitle... no
checking for socketpair... yes
checking for setrgid... no
checking for setegid... yes
checking for setregid... yes
checking for setresgid... yes
checking for issetugid... no
checking for pause... yes
checking for lchown... yes
checking for lchmod... no
checking for getpgrp... yes
checking for setpgrp... yes
checking for getpgid... yes
checking for setpgid... yes
checking for initgroups... yes
checking for getgroups... yes
checking for setgroups... yes
checking for getpriority... yes
checking for getrlimit... yes
checking for setrlimit... yes
checking for sysconf... yes
checking for group_member... yes
checking for dlopen... yes
checking for sigprocmask... yes
checking for sigaction... yes
checking for sigsetjmp... no
checking for _setjmp... yes
checking for _longjmp... yes
checking for snprintf... yes
checking for setsid... yes
checking for telldir... yes
checking for seekdir... yes
checking for fchmod... yes
checking for cosh... yes
checking for sinh... yes
checking for tanh... yes
checking for log2... yes
checking for round... yes
checking for signbit... no
checking for setuid... yes
checking for setgid... yes
checking for daemon... yes
checking for select_large_fdset... no
checking for setenv... yes
checking for unsetenv... yes
checking for mktime... yes
checking for timegm... yes
checking for gmtime_r... yes
checking for clock_gettime... yes
checking for gettimeofday... yes
checking for pread... yes
checking for sendfile... yes
checking for shutdown... yes
checking for sigaltstack... yes
checking for __builtin_setjmp... no
checking for setjmp type... _setjmp
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_zone... yes
checking for struct tm.tm_gmtoff... yes
checking for external int daylight... yes
checking for external timezone... long
checking for external altzone... no
checking for timezone... yes
checking whether timezone requires zero arguments... yes
checking for negative time_t for gmtime(3)... yes
checking whether getpgrp requires zero arguments... yes
checking whether setpgrp takes no argument... yes
checking whether byte ordering is bigendian... no
checking for an ANSI C-conforming const... yes
checking whether char is unsigned... no
checking for inline... inline
checking for working volatile... yes
checking whether right shift preserve sign bit... yes
checking read count field in FILE structures... not found(OK if using GNU libc)
checking read buffer ptr field in FILE structures... _IO_read_ptr
checking read buffer end field in FILE structures... _IO_read_end
checking whether st_ino is huge... yes
checking whether _SC_CLK_TCK is supported... yes
checking stack growing direction... (cached) -1
checking for pthread_kill in -lthr... no
checking for pthread_kill in -lpthread... yes
checking for nanosleep... yes
checking for sched_yield... yes
checking for pthread_attr_setinheritsched... yes
checking for getcontext... yes
checking for setcontext... yes
checking if fork works with pthread... yes
checking for backtrace... yes
checking whether ELF binaries are produced... yes
checking whether OS depend dynamic link works... yes
checking for if make is GNU make... yes
checking for nroff... /usr/bin/nroff
creating config.h
configure: creating ./config.status
config.status: creating Makefile

make 
(please see make.log file)

make test
sample/test.rb:assignment ....................................................................................................................................................................................................................................................................................................................................................................................
sample/test.rb:condition ..
sample/test.rb:if/unless ...
sample/test.rb:case .....
sample/test.rb:while/until ........
sample/test.rb:exception ..........
sample/test.rb:array .......................................
sample/test.rb:hash ...........................
sample/test.rb:iterator ...............................................................................................................
sample/test.rb:float ................................................................................
sample/test.rb:bignum ...............................
sample/test.rb:string & char ..............................................................
sample/test.rb:assignment ..........
sample/test.rb:call ......
sample/test.rb:proc .........
sample/test.rb:signal ..
sample/test.rb:eval .............................
sample/test.rb:system .........
sample/test.rb:const .....
sample/test.rb:clone .....
sample/test.rb:marshal ....
sample/test.rb:pack ....
sample/test.rb:math ..
sample/test.rb:struct ......
sample/test.rb:variable ...........
sample/test.rb:trace ...
sample/test.rb:defined? ............
sample/test.rb:alias ......
sample/test.rb:path .......................
sample/test.rb:gc ....
test succeeded

test_autoload.rb .........
test_io.rb ........................................................
test_block.rb .......................................................
test_method.rb ........................................................................................................................................................................................................................
test_class.rb ...........................................
test_jump.rb .........................
test_objectspace.rb ...
test_flow.rb ...........................................
test_literal.rb ....................................................................................................................................................
test_fork.rb .
test_attr.rb ..
test_proc.rb .................................bootstraptest.tmp.rb:5:in `<main>': ok (RuntimeError)
.
test_thread.rb .............................................
test_load.rb .
test_massign.rb ..................................
test_marshal.rb .
test_eval.rb ..................................
test_struct.rb .
test_flip.rb .
test_syntax.rb ...............................................................................................................................................
test_exception.rb ................................
test_finalizer.rb .
PASS 928 tests
./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb  "./bootstraptest/runner.rb" --ruby="ruby"  ./KNOWNBUGS.rb
2009-02-02 17:12:53 +0400
Driver is ruby 1.9.1 (2009-01-30 patchlevel 0) [i686-linux]
Target is ruby 1.9.1p0 (2009-01-30 revision 21907) [i686-linux]


KNOWNBUGS.rb 
PASS 0 tests

sudo make install
(please see install.log file)

Do I need to install something else ?

install.log - make install log (5 kB) Jérôme Bousquié, 02/02/2009 10:21 pm

History

Updated by Luis Lavena about 3 years ago

You need zlib development headers installed.

If not, the zlib extension doesn't build at all.

Updated by Roman Shterenzon about 3 years ago

Or maybe just warn.
I've bitten by this issue several times already, and I believe that warning the user that these (quite essential) extensions won't be built is a plausible thing.



----- Original Message ----
From: Roger Pack <rogerdpack@gmail.com>
To: ruby-core@ruby-lang.org
Sent: Monday, February 2, 2009 4:24:09 PM
Subject: [ruby-core:21751] Re: [Bug #1090] zlib doesn't load after  installation

On Mon, Feb 2, 2009 at 6:39 AM, Luis Lavena <redmine@ruby-lang.org> wrote:
> Issue #1090 has been updated by Luis Lavena.
>
>
> You need zlib development headers installed.
>
> If not, the zlib extension doesn't build at all.
> ----------------------------------------
> http://redmine.ruby-lang.org/issues/show/1090

One answer would be for 1.9 to err at configure time if zlib and
opensl are not installed [since it comes with gems preinstalled, you'd
expect gems to work]...
Thoughts?
-=r

Updated by Shyouhei Urabe about 3 years ago

  • Status changed from Open to Feedback

Updated by Jérôme Bousquié about 3 years ago

sudo apt-get install zlib1g zlib1g-dev zlibc

That was so easy. Thanks for the answer.
I agree : a simple warning even in the README would be enough to understand the prerequirements.

-- 
Jérôme

Updated by Dylan Hunter over 2 years ago

Not sure that this is closed / feedback level, (or at least, if it is, the above still hasn't fixed the issue for me).

Just built ruby-1.9.1-p129 from source on Ubuntu 9.04.  And although the periods after each line in the build were mutated, (i.e. capital and lower-case C's and m's, rather than periods) finally got it installed.  "gem -v" responds properly as 1.3.1, but if I try to "gem list" / "gem update," etc. I get what looks to be the same response Jerome received above.  Tried to install the zlib packages suggested above, no dice.  Installed, (or at least tried to install - 2 of the packages, zlib1 & zlib1-dev, said they were no longer avail) every other package in the jaunty repositories that start with "zlib," (i.e. zlib1, zlib1-dev, zlib1g, zlib1g-dbg, zlib1g-dev, zlib-bin, zlibc, zlib-gst) and same set of error lines every time.

Since installing anywhere near recent versions of Ruby will probably forever be this manual build from source on any debian-based distros, at least, (i.e. the only version of 1.9 in the repos is 1.9.0 in the regular, and, even as of 2009-07-15, only 1.9.1.0-1 in the highly non-recommended debian experimental repo) any help would be most appreciated.

Thanks,

Dylan

Updated by Yusuke Endoh almost 2 years ago

  • Status changed from Feedback to Rejected
Hi,

The original report of this ticket was false.  So I close the
ticket.


It is difficult to show error/warning at configure time since
extension libraries needs Ruby interpreter to be configured.

It would be good to show summary which extension libraries
were built successfully.

Anyway, it is another topic.  Please register new ticket into
Feature tracker.  And a patch would be welcome.

-- 
Yusuke Endoh <mame@tsg.ne.jp>

Also available in: Atom PDF