Issue #6780 has been updated by jinleileiking (lei king).

File mkmf.log added

=begin
I have some clue.. :)

from mkmf.log, 

we can see, the make cmd, using 


 have_library: checking for deflateReset() in -lz... -------------------- no
 
 "arm-angstrom-linux-gnueabi-gcc -o conftest -I../../.ext/include/arm-linux-eabi -I../.././include -I../.././ext/zlib  -D_FILE_OFFSET_BITS=64   -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long  -fPIC conftest.c  -L. -L../.. -L.  -rdynamic -Wl,-export-dynamic     -Wl,-R -Wl,/lib -L/lib -lruby-static -lz  -lpthread -lrt -ldl -lcrypt -lm   -lc"
 conftest.c: In function 't':
 conftest.c:5: error: 'deflateReset' undeclared (first use in this function)
 conftest.c:5: error: (Each undeclared identifier is reported only once
 conftest.c:5: error: for each function it appears in.)
 checked program was:
 /* begin */
 1: #include "ruby.h"
 2: 
 3: /*top*/
 4: int main() {return 0;}
 5: int t() { void ((*volatile p)()); p = (void ((*)()))deflateReset; return 0; }
 /* end */
 
 "arm-angstrom-linux-gnueabi-gcc -o conftest -I../../.ext/include/arm-linux-eabi -I../.././include -I../.././ext/zlib  -D_FILE_OFFSET_BITS=64   -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long  -fPIC conftest.c  -L. -L../.. -L.  -rdynamic -Wl,-export-dynamic     -Wl,-R -Wl,/lib -L/lib -lruby-static -lz  -lpthread -lrt -ldl -lcrypt -lm   -lc"
 /home/jinleileiking/crosstools/angstrom/usr/local/angstrom/arm/bin/../lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/../../../../arm-angstrom-linux-gnueabi/bin/ld: cannot find -lz
 collect2: ld returned 1 exit status
 checked program was:
 /* begin */
 1: #include "ruby.h"
 2: 
 3: /*top*/
 4: int main() {return 0;}
 5: int t() { deflateReset(); return 0; }
 /* end */


to test whether we have the zlib. 

But in cross-compile env. the conftest generated cannot ran on host. so failed.
=end
----------------------------------------
Bug #6780: cannot compile zlib module, when cross-compiling.
https://bugs.ruby-lang.org/issues/6780#change-28320

Author: jinleileiking (lei king)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: 1.9.2


1_9_2 branch.

using:


env ac_cv_func_setpgrp_void=yes ./configure --host=arm-angstrom-linux-gnueabi --prefix= --enable-shared --disable-install-doc

no zlib library made.


???  ruby git:(ruby_1_9_2) ??? cat ext/Setup
#option nodynamic

#Win32API
#bigdecimal
#curses
#dbm
#digest
#digest/md5
#digest/rmd160
#digest/sha1
#digest/sha2
#dl
#etc
#fcntl
#gdbm
#iconv
#io/wait
#nkf
#openssl
#pty
#racc/cparse
#readline
#ripper
#sdbm
#socket
#stringio
#strscan
#syck
#syslog
#tk
#win32ole
#zlib


the nkf, bigdemical modules are made.

=begin
  P330 nfsboot # find . -name "*.so"
./usr/libexec/xtables/libipt_TTL.so
./usr/libexec/xtables/libxt_mark.so
./usr/libexec/xtables/libipt_ECN.so
./usr/libexec/xtables/libxt_length.so
./usr/libexec/xtables/libxt_NFQUEUE.so
./usr/libexec/xtables/libipt_REJECT.so
./usr/libexec/xtables/libxt_SET.so
./usr/libexec/xtables/libip6t_rt.so
./usr/libexec/xtables/libipt_CLUSTERIP.so
./usr/libexec/xtables/libip6t_icmp6.so
./usr/libexec/xtables/libxt_string.so
./usr/libexec/xtables/libxt_tcp.so
./usr/libexec/xtables/libip6t_dst.so
./usr/libexec/xtables/libxt_TCPOPTSTRIP.so
./usr/libexec/xtables/libxt_physdev.so
./usr/libexec/xtables/libxt_CONNMARK.so
./usr/libexec/xtables/libxt_pkttype.so
./usr/libexec/xtables/libxt_policy.so
./usr/libexec/xtables/libxt_LED.so
./usr/libexec/xtables/libxt_tcpmss.so
./usr/libexec/xtables/libipt_SAME.so
./usr/libexec/xtables/libxt_TEE.so
./usr/libexec/xtables/libxt_TRACE.so
./usr/libexec/xtables/libxt_state.so
./usr/libexec/xtables/libip6t_ah.so
./usr/libexec/xtables/libxt_time.so
./usr/libexec/xtables/libxt_cluster.so
./usr/libexec/xtables/libip6t_hbh.so
./usr/libexec/xtables/libipt_addrtype.so
./usr/libexec/xtables/libxt_DSCP.so
./usr/libexec/xtables/libxt_iprange.so
./usr/libexec/xtables/libip6t_LOG.so
./usr/libexec/xtables/libipt_icmp.so
./usr/libexec/xtables/libip6t_eui64.so
./usr/libexec/xtables/libxt_helper.so
./usr/libexec/xtables/libxt_standard.so
./usr/libexec/xtables/libxt_CT.so
./usr/libexec/xtables/libxt_comment.so
./usr/libexec/xtables/libxt_udp.so
./usr/libexec/xtables/libxt_multiport.so
./usr/libexec/xtables/libxt_rateest.so
./usr/libexec/xtables/libxt_statistic.so
./usr/libexec/xtables/libxt_sctp.so
./usr/libexec/xtables/libxt_tos.so
./usr/libexec/xtables/libipt_DNAT.so
./usr/libexec/xtables/libxt_recent.so
./usr/libexec/xtables/libipt_ttl.so
./usr/libexec/xtables/libxt_conntrack.so
./usr/libexec/xtables/libipt_ecn.so
./usr/libexec/xtables/libxt_CLASSIFY.so
./usr/libexec/xtables/libxt_socket.so
./usr/libexec/xtables/libxt_SECMARK.so
./usr/libexec/xtables/libxt_osf.so
./usr/libexec/xtables/libxt_TCPMSS.so
./usr/libexec/xtables/libipt_REDIRECT.so
./usr/libexec/xtables/libxt_esp.so
./usr/libexec/xtables/libip6t_frag.so
./usr/libexec/xtables/libxt_connmark.so
./usr/libexec/xtables/libipt_unclean.so
./usr/libexec/xtables/libxt_TOS.so
./usr/libexec/xtables/libip6t_HL.so
./usr/libexec/xtables/libxt_set.so
./usr/libexec/xtables/libipt_MASQUERADE.so
./usr/libexec/xtables/libxt_dccp.so
./usr/libexec/xtables/libxt_mac.so
./usr/libexec/xtables/libipt_LOG.so
./usr/libexec/xtables/libipt_NETMAP.so
./usr/libexec/xtables/libxt_connlimit.so
./usr/libexec/xtables/libxt_owner.so
./usr/libexec/xtables/libipt_MIRROR.so
./usr/libexec/xtables/libipt_realm.so
./usr/libexec/xtables/libxt_dscp.so
./usr/libexec/xtables/libxt_NOTRACK.so
./usr/libexec/xtables/libxt_u32.so
./usr/libexec/xtables/libip6t_ipv6header.so
./usr/libexec/xtables/libxt_NFLOG.so
./usr/libexec/xtables/libxt_TPROXY.so
./usr/libexec/xtables/libxt_hashlimit.so
./usr/libexec/xtables/libipt_ULOG.so
./usr/libexec/xtables/libxt_RATEEST.so
./usr/libexec/xtables/libipt_SNAT.so
./usr/libexec/xtables/libxt_limit.so
./usr/libexec/xtables/libip6t_hl.so
./usr/libexec/xtables/libip6t_mh.so
./usr/libexec/xtables/libipt_ah.so
./usr/libexec/xtables/libxt_CONNSECMARK.so
./usr/libexec/xtables/libxt_quota.so
./usr/libexec/xtables/libxt_connbytes.so
./usr/libexec/xtables/libxt_MARK.so
./usr/libexec/xtables/libip6t_REJECT.so
./usr/lib/alsa-lib/smixer/smixer-sbase.so
./usr/lib/alsa-lib/smixer/smixer-hda.so
./usr/lib/alsa-lib/smixer/smixer-ac97.so
./usr/lib/security/pam_unix.so
./usr/lib/security/pam_succeed_if.so
./usr/lib/security/pam_rhosts.so
./usr/lib/security/pam_mail.so
./usr/lib/security/pam_debug.so
./usr/lib/security/pam_nologin.so
./usr/lib/security/pam_stress.so
./usr/lib/security/pam_time.so
./usr/lib/security/pam_namespace.so
./usr/lib/security/pam_filter.so
./usr/lib/security/pam_timestamp.so
./usr/lib/security/pam_faildelay.so
./usr/lib/security/pam_shells.so
./usr/lib/security/pam_env.so
./usr/lib/security/pam_permit.so
./usr/lib/security/pam_issue.so
./usr/lib/security/pam_pwhistory.so
./usr/lib/security/pam_echo.so
./usr/lib/security/pam_tally.so
./usr/lib/security/pam_motd.so
./usr/lib/security/pam_warn.so
./usr/lib/security/pam_ftp.so
./usr/lib/security/pam_limits.so
./usr/lib/security/pam_rootok.so
./usr/lib/security/pam_lastlog.so
./usr/lib/security/pam_securetty.so
./usr/lib/security/pam_xauth.so
./usr/lib/security/pam_access.so
./usr/lib/security/pam_mkhomedir.so
./usr/lib/security/pam_wheel.so
./usr/lib/security/pam_group.so
./usr/lib/security/pam_loginuid.so
./usr/lib/security/pam_umask.so
./usr/lib/security/pam_exec.so
./usr/lib/security/pam_keyinit.so
./usr/lib/security/pam_deny.so
./usr/lib/security/pam_localuser.so
./usr/lib/security/pam_tally2.so
./usr/lib/security/pam_listfile.so
./usr/lib/ts/pthres.so
./usr/lib/ts/tatung.so
./usr/lib/ts/variance.so
./usr/lib/ts/dejitter.so
./usr/lib/ts/linear_h2200.so
./usr/lib/ts/input.so
./usr/lib/ts/corgi.so
./usr/lib/ts/ucb1x00.so
./usr/lib/ts/linear.so
./usr/lib/ts/mk712.so
./usr/lib/ts/arctic2.so
./usr/lib/ts/collie.so
./usr/lib/ts/h3600.so
./lib/libBrokenLocale-2.12.2.so
./lib/libcidn-2.12.2.so
./lib/libruby.so
./lib/libutil-2.12.2.so
./lib/ruby/1.9.1/arm-linux-eabi/etc.so
./lib/ruby/1.9.1/arm-linux-eabi/io/nonblock.so
./lib/ruby/1.9.1/arm-linux-eabi/io/wait.so
./lib/ruby/1.9.1/arm-linux-eabi/objspace.so
./lib/ruby/1.9.1/arm-linux-eabi/digest/rmd160.so
./lib/ruby/1.9.1/arm-linux-eabi/digest/sha1.so
./lib/ruby/1.9.1/arm-linux-eabi/digest/md5.so
./lib/ruby/1.9.1/arm-linux-eabi/digest/sha2.so
./lib/ruby/1.9.1/arm-linux-eabi/digest/bubblebabble.so
./lib/ruby/1.9.1/arm-linux-eabi/stringio.so
./lib/ruby/1.9.1/arm-linux-eabi/json/ext/parser.so
./lib/ruby/1.9.1/arm-linux-eabi/json/ext/generator.so
./lib/ruby/1.9.1/arm-linux-eabi/coverage.so
./lib/ruby/1.9.1/arm-linux-eabi/fiber.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/iso_8859_2.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/gbk.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/iso_8859_6.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/utf_16le.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/koi8_r.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/euc_kr.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/iso_8859_8.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/gb18030.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/iso_8859_14.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/cp949.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/big5.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/encdb.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/iso_8859_5.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/gb2312.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/trans/gbk.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/trans/chinese.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/trans/emoji_sjis_kddi.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/trans/japanese_euc.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/trans/emoji_sjis_docomo.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/trans/japanese_sjis.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/trans/gb18030.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/trans/big5.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/trans/iso2022.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/trans/korean.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/trans/single_byte.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/trans/emoji_sjis_softbank.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/trans/emoji_iso2022_kddi.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/trans/utf8_mac.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/trans/escape.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/trans/emoji.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/trans/transdb.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/trans/japanese.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/trans/utf_16_32.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/iso_8859_13.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/iso_8859_15.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/utf_32le.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/iso_8859_16.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/utf_32be.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/iso_8859_11.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/shift_jis.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/iso_8859_3.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/euc_tw.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/iso_8859_9.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/iso_8859_10.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/iso_8859_1.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/iso_8859_4.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/windows_1251.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/utf_16be.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/iso_8859_7.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/koi8_u.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/emacs_mule.so
./lib/ruby/1.9.1/arm-linux-eabi/enc/euc_jp.so
./lib/ruby/1.9.1/arm-linux-eabi/digest.so
./lib/ruby/1.9.1/arm-linux-eabi/iconv.so
./lib/ruby/1.9.1/arm-linux-eabi/syck.so
./lib/ruby/1.9.1/arm-linux-eabi/nkf.so
./lib/ruby/1.9.1/arm-linux-eabi/continuation.so
./lib/ruby/1.9.1/arm-linux-eabi/bigdecimal.so
./lib/ruby/1.9.1/arm-linux-eabi/sdbm.so
./lib/ruby/1.9.1/arm-linux-eabi/dl.so
./lib/ruby/1.9.1/arm-linux-eabi/racc/cparse.so
./lib/ruby/1.9.1/arm-linux-eabi/pty.so
./lib/ruby/1.9.1/arm-linux-eabi/ripper.so
./lib/ruby/1.9.1/arm-linux-eabi/strscan.so
./lib/ruby/1.9.1/arm-linux-eabi/mathn/rational.so
./lib/ruby/1.9.1/arm-linux-eabi/mathn/complex.so
./lib/ruby/1.9.1/arm-linux-eabi/dl/callback.so
./lib/ruby/1.9.1/arm-linux-eabi/fcntl.so
./lib/ruby/1.9.1/arm-linux-eabi/syslog.so
./lib/libc-2.12.2.so
./lib/libresolv-2.12.2.so
./lib/libm-2.12.2.so
./lib/libanl-2.12.2.so
./lib/libnss_files-2.12.2.so
./lib/libpthread-2.12.2.so
./lib/libnss_compat-2.12.2.so
./lib/libnss_dns-2.12.2.so
./lib/libcrypt-2.12.2.so
./lib/ld-2.12.2.so
./lib/librt-2.12.2.so
./lib/libdl-2.12.2.so
./lib/libnsl-2.12.2.so

=end


-- 
http://bugs.ruby-lang.org/