How can slove it? [ODBC library - link check failed] - makefile

I am allowed to use only this path:[/data/matt/],the system is REDHAT6.5-mini. Boss need rabbitmq,
So,I have build jdk,ncurses6,openssl,pcre8,unixODBC2,zlib in the [/data/matt/matt_env/]
when I build otp_src_22.3.tar.gz,
---
unixODBC-2.3.1]$ ./configure --prefix=/data/matt/matt_env/unixODBC2 --enable-gui=no
otp_src_22.3]$ export LD_LIBRARY_PATH=/data/matt/matt_env/ncurses6/lib:/data/matt/matt_env/openssl/lib:/data/matt/matt_env/zlib/lib:/data/matt/matt_env/unixODBC2/lib:/data/matt/matt_env/pcre8/lib:/lib:/lib64:/usr/lib:/usr/lib64
otp_src_22.3]$ export LIBS=/data/matt/matt_env/ncurses6/lib:/data/matt/matt_env/openssl/lib:/data/matt/matt_env/zlib/lib:/data/matt/matt_env/unixODBC2/lib:/lib:/lib64:/usr/lib:/usr/lib64
export JAVA_HOME=/data/matt/matt_env/jdk1.8.0_251
export CLASSPATH=.:${JAVA_HOME}/jre/lib/rt.jar:${JAVA_HOME}/lib/dt.jar:${JAVA_HOME}/lib/tools.jar
export PATH=$PATH:${JAVA_HOME}/bin
$ export LD_RUN_PATH=/data/matt/matt_env/ncurses6/lib:/data/matt/matt_env/openssl/lib:/data/matt/matt_env/zlib/lib:/data/matt/matt_env/unixODBC2/lib:/lib:/lib64:/usr/lib:/usr/lib64
$ export LIBRARY_PATH=/data/matt/matt_env/ncurses6/lib:/data/matt/matt_env/openssl/lib:/data/matt/matt_env/zlib/lib:/data/matt/matt_env/unixODBC2/lib:/lib:/lib64:/usr/lib:/usr/lib64
otp_src_22.3]$ ./configure --prefix=/data/matt/matt_env/erlang24 LDFLAGS="-L/data/matt/matt_env/ncurses6/lib -L/data/matt/matt_env/openssl/lib -L/data/matt/matt_env/zlib/lib -L/data/matt/matt_env/unixODBC2/lib -L/data/matt/matt_env/pcre8/lib" --with-ssl=/data/matt/matt_env/openssl --with-PACKAGE=/data/matt/matt_env/zlib/lib/pkgconfig --with-PACKAGE=/data/matt/matt_env/pcre8/lib/pkgconfig --without-termcap
---
but ,the result of config tell me :"odbc : ODBC library - link check failed"
and when I [make] ,the err:
##
beam/erl_bif_re.c: In function ‘erts_init_bif_re’:
beam/erl_bif_re.c:96: error: ‘erts_pcre_malloc’ undeclared (first use in this function)
beam/erl_bif_re.c:96: error: (Each undeclared identifier is reported only once
beam/erl_bif_re.c:96: error: for each function it appears in.)
beam/erl_bif_re.c:97: error: ‘erts_pcre_free’ undeclared (first use in this function)
beam/erl_bif_re.c:98: error: ‘erts_pcre_stack_malloc’ undeclared (first use in this function)
beam/erl_bif_re.c:99: error: ‘erts_pcre_stack_free’ undeclared (first use in this function)
beam/erl_bif_re.c:101: error: ‘erts_pcre_stack_guard’ undeclared (first use in this function)
beam/erl_bif_re.c: In function ‘build_compile_result’:
beam/erl_bif_re.c:485: warning: implicit declaration of function ‘erts_pcre_fullinfo’
beam/erl_bif_re.c:496: warning: implicit declaration of function ‘erts_pcre_free’
beam/erl_bif_re.c: In function ‘re_version_0’:
beam/erl_bif_re.c:516: warning: implicit declaration of function ‘erts_pcre_version’
beam/erl_bif_re.c:516: warning: cast to pointer from integer of different size
beam/erl_bif_re.c: In function ‘re_compile’:
beam/erl_bif_re.c:560: warning: implicit declaration of function ‘erts_pcre_compile2’
beam/erl_bif_re.c:561: warning: assignment makes pointer from integer without a cast
beam/erl_bif_re.c: At top level:
beam/erl_bif_re.c:602: error: expected specifier-qualifier-list before ‘erts_pcre_extra’
beam/erl_bif_re.c: In function ‘cleanup_restart_context’:
beam/erl_bif_re.c:616: error: ‘RestartContext’ has no member named ‘restart_data’
beam/erl_bif_re.c:617: warning: implicit declaration of function ‘erts_pcre_free_restart_data’
beam/erl_bif_re.c:617: error: ‘RestartContext’ has no member named ‘restart_data’
beam/erl_bif_re.c:618: error: ‘RestartContext’ has no member named ‘restart_data’
beam/erl_bif_re.c:620: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:621: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:622: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:624: error: ‘RestartContext’ has no member named ‘subject’
beam/erl_bif_re.c:624: error: ‘RestartContext’ has no member named ‘flags’
beam/erl_bif_re.c:625: error: ‘RestartContext’ has no member named ‘subject’
beam/erl_bif_re.c:627: error: ‘RestartContext’ has no member named ‘subject’
beam/erl_bif_re.c:628: error: ‘RestartContext’ has no member named ‘code’
beam/erl_bif_re.c:629: error: ‘RestartContext’ has no member named ‘code’
beam/erl_bif_re.c:630: error: ‘RestartContext’ has no member named ‘code’
beam/erl_bif_re.c:632: error: ‘RestartContext’ has no member named ‘ret_info’
beam/erl_bif_re.c:633: error: ‘RestartContext’ has no member named ‘ret_info’
beam/erl_bif_re.c:634: error: ‘RestartContext’ has no member named ‘ret_info’
beam/erl_bif_re.c: In function ‘build_exec_return’:
beam/erl_bif_re.c:654: error: ‘RestartContext’ has no member named ‘flags’
beam/erl_bif_re.c:671: error: ‘RestartContext’ has no member named ‘ret_info’
beam/erl_bif_re.c:680: error: ‘RestartContext’ has no member named ‘ret_info’
beam/erl_bif_re.c:693: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:694: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:694: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:715: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:723: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:724: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:724: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:749: error: ‘RestartContext’ has no member named ‘flags’
beam/erl_bif_re.c:758: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:759: error: ‘RestartContext’ has no member named ‘subject’
beam/erl_bif_re.c:762: error: ‘RestartContext’ has no member named ‘subject’
beam/erl_bif_re.c:762: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:763: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:763: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:766: error: ‘RestartContext’ has no member named ‘flags’
beam/erl_bif_re.c:770: error: ‘RestartContext’ has no member named ‘subject’
CC obj/x86_64-unknown-linux-gnu/opt/smp/sys_float.o
beam/erl_bif_re.c:807: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:817: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:818: error: ‘RestartContext’ has no member named ‘subject’
beam/erl_bif_re.c:821: error: ‘RestartContext’ has no member named ‘subject’
beam/erl_bif_re.c:821: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:822: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:822: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:825: error: ‘RestartContext’ has no member named ‘flags’
beam/erl_bif_re.c:829: error: ‘RestartContext’ has no member named ‘subject’
beam/erl_bif_re.c: In function ‘build_one_capture’:
beam/erl_bif_re.c:890: warning: implicit declaration of function ‘erts_pcre_get_stringtable_entries’
beam/erl_bif_re.c:914: warning: implicit declaration of function ‘erts_pcre_get_stringnumber’
CC obj/x86_64-unknown-linux-gnu/opt/smp/sys_time.o
beam/erl_bif_re.c: In function ‘re_run’:
beam/erl_bif_re.c:1163: warning: assignment makes pointer from integer without a cast
beam/erl_bif_re.c:1202: error: ‘RestartContext’ has no member named ‘code’
beam/erl_bif_re.c:1203: error: ‘RestartContext’ has no member named ‘code’
beam/erl_bif_re.c:1244: error: ‘RestartContext’ has no member named ‘code’
beam/erl_bif_re.c:1245: error: ‘RestartContext’ has no member named ‘code’
beam/erl_bif_re.c:1251: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:1252: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1252: error: ‘PCRE_EXTRA_LOOP_LIMIT’ undeclared (first use in this function)
beam/erl_bif_re.c:1253: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1254: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1257: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1258: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1260: error: ‘RestartContext’ has no member named ‘restart_data’
beam/erl_bif_re.c:1261: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1261: error: ‘RestartContext’ has no member named ‘restart_data’
beam/erl_bif_re.c:1262: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1263: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1264: error: ‘RestartContext’ has no member named ‘ret_info’
beam/erl_bif_re.c:1267: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1268: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1272: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1273: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1277: error: ‘RestartContext’ has no member named ‘ret_info’
beam/erl_bif_re.c:1277: error: ‘RestartContext’ has no member named ‘code’
beam/erl_bif_re.c:1278: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:1279: error: ‘RestartContext’ has no member named ‘code’
beam/erl_bif_re.c:1287: error: ‘RestartContext’ has no member named ‘flags’
beam/erl_bif_re.c:1307: error: ‘RestartContext’ has no member named ‘subject’
beam/erl_bif_re.c:1308: error: ‘RestartContext’ has no member named ‘flags’
beam/erl_bif_re.c:1313: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:1314: error: ‘RestartContext’ has no member named ‘code’
beam/erl_bif_re.c:1315: error: ‘RestartContext’ has no member named ‘ret_info’
beam/erl_bif_re.c:1316: error: ‘RestartContext’ has no member named ‘ret_info’
beam/erl_bif_re.c:1320: error: ‘RestartContext’ has no member named ‘subject’
beam/erl_bif_re.c:1322: error: ‘RestartContext’ has no member named ‘subject’
beam/erl_bif_re.c:1327: error: ‘RestartContext’ has no member named ‘flags’
beam/erl_bif_re.c:1334: warning: implicit declaration of function ‘erts_pcre_exec’
beam/erl_bif_re.c:1334: error: ‘RestartContext’ has no member named ‘code’
beam/erl_bif_re.c:1334: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1334: error: ‘RestartContext’ has no member named ‘subject’
beam/erl_bif_re.c:1336: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:1345: error: ‘PCRE_ERROR_LOOP_LIMIT’ undeclared (first use in this function)
beam/erl_bif_re.c: In function ‘re_exec_trap’:
beam/erl_bif_re.c:1417: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1420: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1421: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1423: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1424: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1424: error: ‘RestartContext’ has no member named ‘restart_data’
beam/erl_bif_re.c:1425: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1430: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1434: error: ‘PCRE_ERROR_LOOP_LIMIT’ undeclared (first use in this function)
CC obj/x86_64-unknown-linux-gnu/opt/smp/erl_poll.o
CC obj/x86_64-unknown-linux-gnu/opt/smp/erl_check_io.o
make[4]: *** [obj/x86_64-unknown-linux-gnu/opt/smp/erl_bif_re.o] Error 1
make[4]: *** Waiting for unfinished jobs....
sys/common/erl_poll.c: In function ‘erts_poll_wait’:
sys/common/erl_poll.c:1882: warning: unused variable ‘__erts_msacc_state’
beam/erl_nif.c: In function ‘erts_fire_nif_monitor’:
beam/erl_nif.c:2579: warning: ‘brefc’ may be used uninitialized in this function
##
so! how can I slove these questions? I had used a week to try...

export ODBC_LIB=-L"/data/bonc/bonc_env/unixODBC2/lib";export ODBC_INCLUDE="-I/data/bonc/bonc_env/unixODBC2/include" .
not report "ODBC library - link check failed

Related

Compiling Nuklear project works with gcc but not g++

I tried to complile the main.c in Nuklear/demo/d3d11/ (https://github.com/Immediate-Mode-UI/Nuklear/tree/master/demo/d3d11) with gcc on the commend prompt, namely using
gcc main.c -luser32 -ldxguid -ld3d11
It works perfectly.
It works using the "build.bat" too.
However, when I tried to use any of these (also changed the file name to main.cpp if needed)
g++ main.c -luser32 -ldxguid -ld3d11
gcc main.cpp -luser32 -ldxguid -ld3d11
g++ main.cpp -luser32 -ldxguid -ld3d11
It produced a huge amount of "was not declared in this scope" errors.
In file included from main.c:30:
nuklear_d3d11.h: In function 'void nk_d3d11_render(ID3D11DeviceContext*, nk_anti_aliasing)':
nuklear_d3d11.h:101:5: error: 'ID3D11DeviceContext_IASetInputLayout' was not declared in this scope
nuklear_d3d11.h:102:5: error: 'ID3D11DeviceContext_IASetVertexBuffers' was not declared in this scope
nuklear_d3d11.h:103:5: error: 'ID3D11DeviceContext_IASetIndexBuffer' was not declared in this scope
nuklear_d3d11.h:104:5: error: 'ID3D11DeviceContext_IASetPrimitiveTopology' was not declared in this scope
nuklear_d3d11.h:106:5: error: 'ID3D11DeviceContext_VSSetShader' was not declared in this scope
nuklear_d3d11.h:107:5: error: 'ID3D11DeviceContext_VSSetConstantBuffers' was not declared in this scope
nuklear_d3d11.h:109:5: error: 'ID3D11DeviceContext_PSSetShader' was not declared in this scope
nuklear_d3d11.h:110:5: error: 'ID3D11DeviceContext_PSSetSamplers' was not declared in this scope
nuklear_d3d11.h:112:5: error: 'ID3D11DeviceContext_OMSetBlendState' was not declared in this scope
nuklear_d3d11.h:113:5: error: 'ID3D11DeviceContext_RSSetState' was not declared in this scope
nuklear_d3d11.h:114:5: error: 'ID3D11DeviceContext_RSSetViewports' was not declared in this scope
nuklear_d3d11.h:124:10: error: 'ID3D11DeviceContext_Map' was not declared in this scope; did you mean 'ID3D11DeviceContext'?
nuklear_d3d11.h:156:5: error: 'ID3D11DeviceContext_Unmap' was not declared in this scope; did you mean 'ID3D11DeviceContext'?
nuklear_d3d11.h:171:9: error: 'ID3D11DeviceContext_PSSetShaderResources' was not declared in this scope
nuklear_d3d11.h:172:9: error: 'ID3D11DeviceContext_RSSetScissorRects' was not declared in this scope
nuklear_d3d11.h:173:9: error: 'ID3D11DeviceContext_DrawIndexed' was not declared in this scope
In file included from D:/OtherProgramFiles/msys64/mingw64/include/winbase.h:2682,
from D:/OtherProgramFiles/msys64/mingw64/include/windows.h:70,
from main.c:7:
nuklear_d3d11.h: In function 'void nk_d3d11_resize(ID3D11DeviceContext*, int, int)':
nuklear_d3d11.h:205:19: error: 'ID3D11DeviceContext_Map' was not declared in this scope; did you mean 'ID3D11DeviceContext'?
nuklear_d3d11.h:208:9: error: 'ID3D11DeviceContext_Unmap' was not declared in this scope; did you mean 'ID3D11DeviceContext'?
nuklear_d3d11.h: In function 'nk_context* nk_d3d11_init(ID3D11Device*, int, int, unsigned int, unsigned int)':
nuklear_d3d11.h:444:5: error: 'ID3D11Device_AddRef' was not declared in this scope
nuklear_d3d11.h:466:10: error: 'ID3D11Device_CreateRasterizerState' was not declared in this scope
nuklear_d3d11.h:470:11: error: 'ID3D11Device_CreateVertexShader' was not declared in this scope
nuklear_d3d11.h:479:10: error: 'ID3D11Device_CreateInputLayout' was not declared in this scope
nuklear_d3d11.h:498:10: error: 'ID3D11Device_CreateBuffer' was not declared in this scope
nuklear_d3d11.h:502:11: error: 'ID3D11Device_CreatePixelShader' was not declared in this scope
nuklear_d3d11.h:517:10: error: 'ID3D11Device_CreateBlendState' was not declared in this scope
nuklear_d3d11.h:528:10: error: 'ID3D11Device_CreateBuffer' was not declared in this scope
nuklear_d3d11.h:538:10: error: 'ID3D11Device_CreateBuffer' was not declared in this scope
nuklear_d3d11.h:552:10: error: 'ID3D11Device_CreateSamplerState' was not declared in this scope
nuklear_d3d11.h: In function 'void nk_d3d11_font_stash_end()':
nuklear_d3d11.h:600:10: error: 'ID3D11Device_CreateTexture2D' was not declared in this scope
nuklear_d3d11.h:609:10: error: 'ID3D11Device_CreateShaderResourceView' was not declared in this scope; did you mean 'ID3D11ShaderResourceView'?
nuklear_d3d11.h:611:5: error: 'ID3D11Texture2D_Release' was not declared in this scope; did you mean 'ID3D11Texture2D'?
nuklear_d3d11.h: In function 'void nk_d3d11_shutdown()':
nuklear_d3d11.h:625:5: error: 'ID3D11SamplerState_Release' was not declared in this scope; did you mean 'ID3D11SamplerState'?
nuklear_d3d11.h:626:5: error: 'ID3D11ShaderResourceView_Release' was not declared in this scope; did you mean 'ID3D11ShaderResourceView'?
nuklear_d3d11.h:627:5: error: 'ID3D11Buffer_Release' was not declared in this scope
nuklear_d3d11.h:629:5: error: 'ID3D11BlendState_Release' was not declared in this scope; did you mean 'ID3D11BlendState'?
nuklear_d3d11.h:630:5: error: 'ID3D11PixelShader_Release' was not declared in this scope; did you mean 'ID3D11PixelShader'?
nuklear_d3d11.h:632:5: error: 'ID3D11VertexShader_Release' was not declared in this scope; did you mean 'ID3D11VertexShader'?
nuklear_d3d11.h:633:5: error: 'ID3D11InputLayout_Release' was not declared in this scope; did you mean 'ID3D11InputLayout'?
nuklear_d3d11.h:634:5: error: 'ID3D11RasterizerState_Release' was not declared in this scope; did you mean 'ID3D11RasterizerState'?
nuklear_d3d11.h:635:5: error: 'ID3D11Device_Release' was not declared in this scope
main.c: In function 'void set_swap_chain_size(int, int)':
main.c:89:9: error: 'ID3D11RenderTargetView_Release' was not declared in this scope; did you mean 'ID3D11RenderTargetView'?
main.c:91:5: error: 'ID3D11DeviceContext_OMSetRenderTargets' was not declared in this scope
main.c:93:10: error: 'IDXGISwapChain_ResizeBuffers' was not declared in this scope
main.c:106:10: error: 'IDXGISwapChain_GetBuffer' was not declared in this scope
main.c:109:10: error: 'ID3D11Device_CreateRenderTargetView' was not declared in this scope
main.c:112:5: error: 'ID3D11Texture2D_Release' was not declared in this scope; did you mean 'ID3D11Texture2D'?
main.c: In function 'int main()':
main.c:294:9: error: 'ID3D11DeviceContext_ClearRenderTargetView' was not declared in this scope
main.c:295:9: error: 'ID3D11DeviceContext_OMSetRenderTargets' was not declared in this scope
main.c:297:14: error: 'IDXGISwapChain_Present' was not declared in this scope; did you mean 'IDXGISwapChain'?
main.c:309:5: error: 'ID3D11DeviceContext_ClearState' was not declared in this scope
main.c:311:5: error: 'ID3D11RenderTargetView_Release' was not declared in this scope; did you mean 'ID3D11RenderTargetView'?
main.c:312:5: error: 'ID3D11DeviceContext_Release' was not declared in this scope; did you mean 'ID3D11DeviceContext'?
main.c:313:5: error: 'ID3D11Device_Release' was not declared in this scope
main.c:314:5: error: 'IDXGISwapChain_Release' was not declared in this scope; did you mean 'IDXGISwapChain'?
All four commends work if I replace main.c/main.cpp with a simple hello world script (in C, also in C++ if I add "-lstdc++").
I think all of the errors come from things in msys64\mingw64\include\d3d11.h. It may be a linking problem. But the headers are included correctly otherwise "gcc main.c" won't works. I also tried to use "extern "C" {}", but it also didn't work.
I have tried to use Visual Studio commend prompt, Visual Studio Code and commend prompt in Windows. All have the same result.
As I want to use C++ with Nuklear, how can I do it with g++?

Need a different kernel header with struct net_device to compile MadWifi drivers against

I'm pretty new to all of this so sorry about the large amount of nonsense this post is comprised of as I try and word what I want to say.
I am trying to compile the MadWiFi kernel module but unfortunately getting the error below. The problem (AFAIK) is that the kernel headers I am using have a new struct to replace net_device.
Can I use a different set of kernel headers to compile it against or would the resulting module not be compatible with my kernel?
make -C /lib/modules/2.6.32-5-686/build SUBDIRS=/home/madwifi-0.9.4 modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-5-686'
make[1]: Warning: File `Makefile' has modification time 4.2e+08 s in the future
make[2]: Warning: File `Makefile' has modification time 4.2e+08 s in the future
make[3]: Warning: File `/usr/src/linux-headers-2.6.32-5-common/arch/x86/Makefile_32.cpu' has modification time 4.2e+08 s in the future
make[4]: Warning: File `scripts/Makefile.lib' has modification time 3.1e+08 s in the future
make[5]: Warning: File `scripts/Makefile.lib' has modification time 3.1e+08 s in the future
CC [M] /home/madwifi-0.9.4/ath/if_ath.o
In file included from /home/madwifi-0.9.4/ath/../net80211/ieee80211_monitor.h:45,
from /home/madwifi-0.9.4/ath/if_ath.c:71:
/home/madwifi-0.9.4/ath/../ath/if_athvar.h:98: error: conflicting types for 'irqreturn_t'
/usr/src/linux-headers-2.6.32-5-common/include/linux/irqreturn.h:16: error: previous declaration of 'irqreturn_t' was here
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_attach':
/home/madwifi-0.9.4/ath/if_ath.c:402: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c:678: error: 'struct net_device' has no member named 'open'
/home/madwifi-0.9.4/ath/if_ath.c:679: error: 'struct net_device' has no member named 'stop'
/home/madwifi-0.9.4/ath/if_ath.c:680: error: 'struct net_device' has no member named 'hard_start_xmit'
/home/madwifi-0.9.4/ath/if_ath.c:681: error: 'struct net_device' has no member named 'tx_timeout'
/home/madwifi-0.9.4/ath/if_ath.c:683: error: 'struct net_device' has no member named 'set_multicast_list'
/home/madwifi-0.9.4/ath/if_ath.c:684: error: 'struct net_device' has no member named 'do_ioctl'
/home/madwifi-0.9.4/ath/if_ath.c:685: error: 'struct net_device' has no member named 'get_stats'
/home/madwifi-0.9.4/ath/if_ath.c:686: error: 'struct net_device' has no member named 'set_mac_address'
/home/madwifi-0.9.4/ath/if_ath.c:687: error: 'struct net_device' has no member named 'change_mtu'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_detach':
/home/madwifi-0.9.4/ath/if_ath.c:958: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c:1005: error: 'struct net_device' has no member named 'stop'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_vap_create':
/home/madwifi-0.9.4/ath/if_ath.c:1014: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c:1084: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_vap_delete':
/home/madwifi-0.9.4/ath/if_ath.c:1248: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_suspend':
/home/madwifi-0.9.4/ath/if_ath.c:1350: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_resume':
/home/madwifi-0.9.4/ath/if_ath.c:1359: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_intr':
/home/madwifi-0.9.4/ath/if_ath.c:1652: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_bmiss_tasklet':
/home/madwifi-0.9.4/ath/if_ath.c:1843: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_init':
/home/madwifi-0.9.4/ath/if_ath.c:1886: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_stop_locked':
/home/madwifi-0.9.4/ath/if_ath.c:2014: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_stop':
/home/madwifi-0.9.4/ath/if_ath.c:2078: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_reset':
/home/madwifi-0.9.4/ath/if_ath.c:2182: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_tx_startraw':
/home/madwifi-0.9.4/ath/if_ath.c:2343: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_hardstart':
/home/madwifi-0.9.4/ath/if_ath.c:2558: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_mgtstart':
/home/madwifi-0.9.4/ath/if_ath.c:2875: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_key_alloc':
/home/madwifi-0.9.4/ath/if_ath.c:3237: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_key_delete':
/home/madwifi-0.9.4/ath/if_ath.c:3304: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_key_set':
/home/madwifi-0.9.4/ath/if_ath.c:3380: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_key_update_begin':
/home/madwifi-0.9.4/ath/if_ath.c:3395: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_key_update_end':
/home/madwifi-0.9.4/ath/if_ath.c:3416: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_mode_init':
/home/madwifi-0.9.4/ath/if_ath.c:3504: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_updateslot':
/home/madwifi-0.9.4/ath/if_ath.c:3555: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_beacon_dturbo_config':
/home/madwifi-0.9.4/ath/if_ath.c:3585: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_beacon_dturbo_update':
/home/madwifi-0.9.4/ath/if_ath.c:3633: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_turbo_switch_mode':
/home/madwifi-0.9.4/ath/if_ath.c:3776: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_bstuck_tasklet':
/home/madwifi-0.9.4/ath/if_ath.c:4368: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_node_alloc':
/home/madwifi-0.9.4/ath/if_ath.c:4820: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_node_cleanup':
/home/madwifi-0.9.4/ath/if_ath.c:4855: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_node_free':
/home/madwifi-0.9.4/ath/if_ath.c:4909: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_rx_capture':
/home/madwifi-0.9.4/ath/if_ath.c:5404: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_tx_capture':
/home/madwifi-0.9.4/ath/if_ath.c:5437: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_recv_mgmt':
/home/madwifi-0.9.4/ath/if_ath.c:5502: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_rx_tasklet':
/home/madwifi-0.9.4/ath/if_ath.c:5574: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_grppoll_start':
/home/madwifi-0.9.4/ath/if_ath.c:6013: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_grppoll_stop':
/home/madwifi-0.9.4/ath/if_ath.c:6226: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_wme_update':
/home/madwifi-0.9.4/ath/if_ath.c:6441: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_uapsd_flush':
/home/madwifi-0.9.4/ath/if_ath.c:6460: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_tx_start':
/home/madwifi-0.9.4/ath/if_ath.c:6655: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_tx_tasklet_q0':
/home/madwifi-0.9.4/ath/if_ath.c:7495: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_tx_tasklet_q0123':
/home/madwifi-0.9.4/ath/if_ath.c:7516: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_tx_tasklet':
/home/madwifi-0.9.4/ath/if_ath.c:7551: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_tx_timeout':
/home/madwifi-0.9.4/ath/if_ath.c:7574: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_calibrate':
/home/madwifi-0.9.4/ath/if_ath.c:7937: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_scan_start':
/home/madwifi-0.9.4/ath/if_ath.c:8003: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_scan_end':
/home/madwifi-0.9.4/ath/if_ath.c:8023: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_set_channel':
/home/madwifi-0.9.4/ath/if_ath.c:8041: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_set_coverageclass':
/home/madwifi-0.9.4/ath/if_ath.c:8057: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_mhz2ieee':
/home/madwifi-0.9.4/ath/if_ath.c:8067: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_newstate':
/home/madwifi-0.9.4/ath/if_ath.c:8082: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_setup_stationkey':
/home/madwifi-0.9.4/ath/if_ath.c:8471: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_newassoc':
/home/madwifi-0.9.4/ath/if_ath.c:8631: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_getchannels':
/home/madwifi-0.9.4/ath/if_ath.c:8662: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_xr_rate_setup':
/home/madwifi-0.9.4/ath/if_ath.c:8832: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_setup_subrates':
/home/madwifi-0.9.4/ath/if_ath.c:8861: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_rate_setup':
/home/madwifi-0.9.4/ath/if_ath.c:8904: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_getstats':
/home/madwifi-0.9.4/ath/if_ath.c:9141: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_set_mac_address':
/home/madwifi-0.9.4/ath/if_ath.c:9164: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_change_mtu':
/home/madwifi-0.9.4/ath/if_ath.c:9196: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_ioctl':
/home/madwifi-0.9.4/ath/if_ath.c:9283: error: 'struct net_device' has no member named 'priv'
cc1: warnings being treated as errors
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_sysctl_halparam':
/home/madwifi-0.9.4/ath/if_ath.c:9370: error: passing argument 5 of 'proc_dointvec' from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9370: error: too many arguments to function 'proc_dointvec'
/home/madwifi-0.9.4/ath/if_ath.c:9562: error: passing argument 5 of 'proc_dointvec' from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9562: error: too many arguments to function 'proc_dointvec'
/home/madwifi-0.9.4/ath/if_ath.c: At top level:
/home/madwifi-0.9.4/ath/if_ath.c:9574: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9580: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9586: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9592: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9598: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9604: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9610: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9616: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9623: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9630: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9636: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9642: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9648: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9654: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9660: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9667: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9673: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9680: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c:9686: error: initialization from incompatible pointer type
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_announce':
/home/madwifi-0.9.4/ath/if_ath.c:9779: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c: In function 'ath_rcv_dev_event':
/home/madwifi-0.9.4/ath/if_ath.c:9926: error: 'struct net_device' has no member named 'priv'
/home/madwifi-0.9.4/ath/if_ath.c:9928: error: 'struct net_device' has no member named 'open'
make[5]: *** [/home/madwifi-0.9.4/ath/if_ath.o] Error 1
make[4]: *** [/home/madwifi-0.9.4/ath] Error 2
make[3]: *** [_module_/home/madwifi-0.9.4] Error 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-5-686'
make: *** [modules] Error 2
More info on my kernel:
root#alix:~# cat /proc/version
Linux version 2.6.32-5-686 (Debian 2.6.32-45) (dannf#debian.org) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Sun May 6 04:01:19 UTC 2012
root#alix:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 6.0.5 (squeeze)
Release: 6.0.5
Codename: squeeze
MadWifi is currently maintained at https://github.com/proski/madwifi. It should support all Linux kernels from 2.6.13 to the latest released kernel (currently 3.12). MadWifi is in maintenance-only mode. No new features are accepted, only fixes. No formal releases are planned. Use ath5k or ath9k that come with your Linux kernel unless you have a reason not to.
Messages about modification time in the future mean that your computer clock is not set correctly or was incorrect when you unpacked the source.
MadWiFi is deprecated. ath5k and ath9k are supposedly the replacements, and ship with the kernel. The errors you are getting are due to changes in the kernel API, and the only way to use your module with your current kernel would be to update the module as necessary, which is not a trivial task. Stick with the new drivers unless you have a really good reason.

Linux kernel programming

i want to catch pipe() syscall, so i've changed source code in pipe.c
static pipe_hook_t pipe_hook;
pipe_hook_t set_pipe_hook(pipe_hook_t hook)
{
pipe_hook_t old_hook = pipe_hook;
pipe_hook = hook;
printk(KERN_INFO, "pipe hook: %p", hook);
return old_hook;
}
EXPORT_SYMBOL_GPL(set_pipe_hook);
then i tried to define pipe_hook_t in file syscalls.h (included in pipe.c)
typedef void (*pipe_hook_t)(int *filedes);
pipe_hook_t set_pipe_hook(pipe_hook_t hook);
and i have error:
fs/pipe.c:1130: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pipe_hook’
fs/pipe.c:1131: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘set_pipe_hook’
fs/pipe.c:1138: error: ‘set_pipe_hook’ undeclared here (not in a function)
fs/pipe.c:1138: warning: type defaults to ‘int’ in declaration of ‘set_pipe_hook’
fs/pipe.c: In function ‘sys_pipe2’:
fs/pipe.c:1153: error: ‘pipe_hook’ undeclared (first use in this function)
fs/pipe.c:1153: error: (Each undeclared identifier is reported only once
fs/pipe.c:1153: error: for each function it appears in.)
fs/pipe.c:1154: error: implicit declaration of function ‘pipe_hook’
i've tried to create my own .h file and define pipe_hook_t there but the error was the same
Problem has been solved. I've just confused directory where header files are.

Ruby save Excel as CSV

I am trying to go through each .xls file in a directory and save a .csv for each file. I am working with the 'roo' gem and am seeing some errors. Totally open to other approaches, I just need to keep this in Ruby without moving to Ruby on Rails. I am running Ruby 1.9.2 and executing in terminal on a Mac.
Code so far:
#! /usr/bin/ruby
require 'roo'
# change excel files to csv
begin
Dir["/tmp/*.xls"].each do |file|
file_path = "#{file}"
file_basename = File.basename(file, ".xls")
xls = Excel.new(file_path)
xls.to_csv = ("/tmp/#{file_basename}.csv")
end
end
And here is the error I get: (line numbers are not the same as example, line 27 is begin statement)
/Users/pierce/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/roo-1.10.1/lib/roo/excel.rb:284:in `platform_specific_iconv': uninitialized constant Excel::Iconv (NameError)
from /Users/pierce/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/roo-1.10.1/lib/roo/excel.rb:277:in `normalize_string'
from /Users/pierce/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/roo-1.10.1/lib/roo/excel.rb:139:in `block in sheets'
from /Users/pierce/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/roo-1.10.1/lib/roo/excel.rb:139:in `collect'
from /Users/pierce/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/roo-1.10.1/lib/roo/excel.rb:139:in `sheets'
from /Users/pierce/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/roo-1.10.1/lib/roo/excel.rb:123:in `initialize'
from excel_conversion_test.rb:32:in `new'
from excel_conversion_test.rb:32:in `block in <main>'
from excel_conversion_test.rb:28:in `each'
from excel_conversion_test.rb:28:in `<main>'
As suggested I tried to install inconv and got the following errors:
ERROR: Error installing iconv:
ERROR: Failed to build gem native extension.
/Users/pierce/.rbenv/versions/1.9.2-p290/bin/ruby extconf.rb
checking for iconv() in iconv.h... no
checking for iconv() in -liconv... yes
checking for const of iconv() 2nd argument... no
creating Makefile
make
/usr/bin/gcc-4.2 -I. -I/Users/pierce/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/x86_64-darwin11.2.0 -I/Users/pierce/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/Users/pierce/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1 -I. -I'/Users/pierce/.rbenv/versions/1.9.2-p290/include' -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long -pipe -o iconv.o -c iconv.c
In file included from iconv.c:21:
/Users/pierce/.rbenv/versions/1.9.2-p290/include/ruby-1.9.1/ruby/backward/st.h:2:2: warning: #warning use "ruby/st.h" instead of bare "st.h"
iconv.c:22:20: error: intern.h: No such file or directory
iconv.c: In function ‘map_charset’:
iconv.c:139: error: ‘struct RHash’ has no member named ‘tbl’
iconv.c:139: error: ‘struct RHash’ has no member named ‘tbl’
iconv.c:142: error: ‘struct RHash’ has no member named ‘tbl’
iconv.c: In function ‘iconv_create’:
iconv.c:187: error: ‘struct RString’ has no member named ‘len’
iconv.c:188: error: ‘struct RString’ has no member named ‘len’
iconv.c:190: error: ‘struct RString’ has no member named ‘ptr’
iconv.c:190: error: ‘struct RString’ has no member named ‘ptr’
iconv.c:190: error: ‘struct RString’ has no member named ‘ptr’
iconv.c:190: error: ‘struct RString’ has no member named ‘ptr’
iconv.c:192: error: ‘struct RString’ has no member named ‘ptr’
iconv.c:193: error: ‘struct RString’ has no member named ‘len’
iconv.c: In function ‘iconv_fail’:
iconv.c:328: error: ‘struct RString’ has no member named ‘len’
iconv.c: In function ‘iconv_fail_retry’:
iconv.c:352: error: ‘ruby_errinfo’ undeclared (first use in this function)
iconv.c:352: error: (Each undeclared identifier is reported only once
iconv.c:352: error: for each function it appears in.)
iconv.c: In function ‘rb_str_derive’:
iconv.c:371: error: ‘struct RString’ has no member named ‘ptr’
iconv.c:371: error: ‘struct RString’ has no member named ‘len’
iconv.c:373: error: ‘struct RString’ has no member named ‘ptr’
iconv.c:373: error: ‘struct RString’ has no member named ‘len’
iconv.c:374: error: ‘struct RString’ has no member named ‘ptr’
iconv.c: In function ‘iconv_convert’:
iconv.c:418: error: ‘struct RArray’ has no member named ‘len’
iconv.c:418: error: ‘struct RArray’ has no member named ‘ptr’
iconv.c:436: error: ‘struct RString’ has no member named ‘len’
iconv.c:437: error: ‘struct RString’ has no member named ‘ptr’
iconv.c:455: warning: comparison of unsigned expression >= 0 is always true
iconv.c:458: warning: comparison between signed and unsigned
iconv.c:459: warning: comparison between signed and unsigned
iconv.c:491: warning: implicit conversion shortens 64-bit value into a 32-bit value
iconv.c:494: warning: implicit conversion shortens 64-bit value into a 32-bit value
iconv.c:497: error: ‘struct RArray’ has no member named ‘len’
iconv.c:498: error: ‘struct RArray’ has no member named ‘ptr’
iconv.c:499: error: ‘struct RArray’ has no member named ‘ptr’
iconv.c:501: error: ‘struct RString’ has no member named ‘len’
iconv.c:502: error: ‘struct RString’ has no member named ‘ptr’
iconv.c:514: warning: implicit conversion shortens 64-bit value into a 32-bit value
iconv.c: In function ‘iconv_s_convert’:
iconv.c:615: error: ‘struct RString’ has no member named ‘len’
make: *** [iconv.o] Error 1
Gem files will remain installed in /Users/pierce/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/iconv-0.1 for inspection.
Add this: require 'iconv' before require 'roo'. I found this solution here, and i got there using this query on google: roo/excel.rb:284. An example here! Notice about the = in this line: xls.to_csv = ("/tmp/#{file_basename}.csv") that should not be there.
I decided to post an answer to try and explain this situation for anyone else that arrives here from Google.
As David points out, to fix this error...
uninitialized constant Excel::Iconv
...you'll have to require "iconv":
require "iconv"
require "roo"
This is because the Roo gem calls Iconv.new in its internal Excel class but Roo forgot to require "iconv" itself, so you're forced to do it. It's a bug. It's no different than calling Set.new without require "set"
Iconv is part of Ruby 1.8 and 1.9's standard library. You don't install it. It's already there.
However, it's worth pointing out that Iconv is deprecated in Ruby 1.9 and removed in Ruby 2.0.

install Ruby 1.8.6 with rvm in Mac OS X 10.6 Snow Leopard failed

I'm trying to learn Ruby on Rails and wanted to follow Apple's example:
http://developer.apple.com/tools/developonrailsleopard.html
It requires Ruby 1.8.6 and Rails 2.0.2
My machines is already updated to 1.9.1. I wanted to use rvm to install 1.8.6 but it failed during make with the following log:
[2010-10-20 10:43:31] make
eval.c: In function ‘rb_eval_string_wrap’:
eval.c:1743: warning: assignment discards qualifiers from pointer target type
eval.c: In function ‘rb_eval_cmd’:
eval.c:1884: warning: assignment discards qualifiers from pointer target type
eval.c: In function ‘call_trace_func’:
eval.c:2735: warning: assignment discards qualifiers from pointer target type
eval.c: In function ‘rb_raise_jump’:
eval.c:4760: warning: assignment discards qualifiers from pointer target type
eval.c: In function ‘method_missing’:
eval.c:5684: warning: assignment discards qualifiers from pointer target type
eval.c: In function ‘rb_call0’:
eval.c:5847: warning: assignment discards qualifiers from pointer target type
eval.c: In function ‘rb_f_eval’:
eval.c:6634: warning: assignment discards qualifiers from pointer target type
eval.c: In function ‘exec_under’:
eval.c:6658: warning: assignment discards qualifiers from pointer target type
eval.c: In function ‘rb_load’:
eval.c:6894: warning: assignment discards qualifiers from pointer target type
eval.c: In function ‘call_end_proc’:
eval.c:7924: warning: assignment discards qualifiers from pointer target type
eval.c: In function ‘rb_f_END’:
eval.c:7937: warning: assignment discards qualifiers from pointer target type
eval.c: In function ‘mproc’:
eval.c:9557: warning: assignment discards qualifiers from pointer target type
file.c: In function ‘lchmod_internal’:
file.c:1787: warning: cast from pointer to integer of different size
gc.c: In function ‘obj_free’:
gc.c:1287: warning: initialization from incompatible pointer type
regex.c: In function ‘ruby_re_compile_pattern’:
regex.c:1362: warning: format ‘%d’ expects type ‘int’, but argument 7 has type ‘long int’
regex.c:2026: warning: format ‘%d’ expects type ‘int’, but argument 6 has type ‘long int’
ptr.c: In function ‘rb_dlptr_inspect’:
ptr.c:461: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 7 has type ‘struct ptr_data *’
ptr.c:461: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 8 has type ‘void *’
void
char
short
int
long
float
double
sym.c: In function ‘rb_dlsym_inspect’:
sym.c:270: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 6 has type ‘struct sym_data *’
sym.c:270: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 7 has type ‘void *’
ossl_asn1.c: In function ‘decode_bool’:
ossl_asn1.c:313: warning: passing argument 2 of ‘d2i_ASN1_BOOLEAN’ from incompatible pointer type
ossl_asn1.c: In function ‘decode_int’:
ossl_asn1.c:328: warning: passing argument 2 of ‘d2i_ASN1_INTEGER’ from incompatible pointer type
ossl_asn1.c: In function ‘decode_bstr’:
ossl_asn1.c:347: warning: passing argument 2 of ‘d2i_ASN1_BIT_STRING’ from incompatible pointer type
ossl_asn1.c: In function ‘decode_enum’:
ossl_asn1.c:373: warning: passing argument 2 of ‘d2i_ASN1_ENUMERATED’ from incompatible pointer type
ossl_asn1.c: In function ‘decode_null’:
ossl_asn1.c:390: warning: passing argument 2 of ‘d2i_ASN1_NULL’ from incompatible pointer type
ossl_asn1.c: In function ‘decode_obj’:
ossl_asn1.c:407: warning: passing argument 2 of ‘d2i_ASN1_OBJECT’ from incompatible pointer type
ossl_asn1.c: In function ‘decode_time’:
ossl_asn1.c:435: warning: passing argument 2 of ‘d2i_ASN1_TIME’ from incompatible pointer type
ossl_asn1.c: In function ‘ossl_asn1_get_asn1type’:
ossl_asn1.c:503: warning: cast to pointer from integer of different size
ossl_asn1.c: In function ‘ossl_asn1_decode0’:
ossl_asn1.c:727: warning: passing argument 1 of ‘ASN1_get_object’ from incompatible pointer type
ossl_ns_spki.c: In function ‘ossl_spki_initialize’:
ossl_ns_spki.c:67: warning: passing argument 2 of ‘d2i_NETSCAPE_SPKI’ from incompatible pointer type
ossl_ocsp.c: In function ‘ossl_ocspreq_initialize’:
ossl_ocsp.c:114: warning: passing argument 2 of ‘d2i_OCSP_REQUEST’ from incompatible pointer type
ossl_ocsp.c: In function ‘ossl_ocspres_initialize’:
ossl_ocsp.c:321: warning: passing argument 2 of ‘d2i_OCSP_RESPONSE’ from incompatible pointer type
ossl_pkcs7.c: In function ‘ossl_pkcs7si_new’:
ossl_pkcs7.c:90: warning: passing argument 2 of ‘ASN1_dup’ from incompatible pointer type
ossl_pkcs7.c: In function ‘DupPKCS7SignerPtr’:
ossl_pkcs7.c:103: warning: passing argument 2 of ‘ASN1_dup’ from incompatible pointer type
ossl_pkcs7.c: In function ‘ossl_pkcs7ri_new’:
ossl_pkcs7.c:116: warning: passing argument 2 of ‘ASN1_dup’ from incompatible pointer type
ossl_pkcs7.c: In function ‘DupPKCS7RecipientPtr’:
ossl_pkcs7.c:129: warning: passing argument 2 of ‘ASN1_dup’ from incompatible pointer type
ossl_pkey_dsa.c: In function ‘ossl_dsa_initialize’:
ossl_pkey_dsa.c:141: warning: passing argument 1 of ‘PEM_ASN1_read_bio’ from incompatible pointer type
ossl_pkey_dsa.c:141: warning: passing argument 4 of ‘PEM_ASN1_read_bio’ from incompatible pointer type
ossl_pkey_dsa.c: In function ‘ossl_dsa_to_public_key’:
ossl_pkey_dsa.c:313: warning: passing argument 2 of ‘ASN1_dup’ from incompatible pointer type
ossl_x509attr.c: In function ‘ossl_x509attr_initialize’:
ossl_x509attr.c:100: warning: passing argument 2 of ‘d2i_X509_ATTRIBUTE’ from incompatible pointer type
ossl_x509ext.c: In function ‘ossl_x509ext_initialize’:
ossl_x509ext.c:285: warning: passing argument 2 of ‘d2i_X509_EXTENSION’ from incompatible pointer type
ossl_x509name.c: In function ‘ossl_x509name_initialize’:
ossl_x509name.c:135: warning: passing argument 2 of ‘d2i_X509_NAME’ from incompatible pointer type
ossl_x509revoked.c: In function ‘ossl_x509revoked_new’:
ossl_x509revoked.c:48: warning: passing argument 2 of ‘ASN1_dup’ from incompatible pointer type
ossl_x509revoked.c: In function ‘DupX509RevokedPtr’:
ossl_x509revoked.c:64: warning: passing argument 2 of ‘ASN1_dup’ from incompatible pointer type
readline.c: In function ‘username_completion_proc_call’:
readline.c:730: error: ‘username_completion_function’ undeclared (first use in this function)
readline.c:730: error: (Each undeclared identifier is reported only once
readline.c:730: error: for each function it appears in.)
make[1]: *** [readline.o] Error 1
make: *** [all] Error 1
[2010-10-20 10:50:17] make
readline.c: In function ‘username_completion_proc_call’:
readline.c:730: error: ‘username_completion_function’ undeclared (first use in this function)
readline.c:730: error: (Each undeclared identifier is reported only once
readline.c:730: error: for each function it appears in.)
make[1]: *** [readline.o] Error 1
make: *** [all] Error 1
[2010-10-20 11:48:12] make
readline.c: In function ‘username_completion_proc_call’:
readline.c:730: error: ‘username_completion_function’ undeclared (first use in this function)
readline.c:730: error: (Each undeclared identifier is reported only once
readline.c:730: error: for each function it appears in.)
make[1]: *** [readline.o] Error 1
make: *** [all] Error 1
[2010-10-20 15:30:53] make
readline.c: In function ‘username_completion_proc_call’:
readline.c:730: error: ‘username_completion_function’ undeclared (first use in this function)
readline.c:730: error: (Each undeclared identifier is reported only once
readline.c:730: error: for each function it appears in.)
make[1]: *** [readline.o] Error 1
make: *** [all] Error 1
[2010-10-20 17:19:27] make
readline.c: In function ‘username_completion_proc_call’:
readline.c:730: error: ‘username_completion_function’ undeclared (first use in this function)
readline.c:730: error: (Each undeclared identifier is reported only once
readline.c:730: error: for each function it appears in.)
make[1]: *** [readline.o] Error 1
make: *** [all] Error 1
Can anyone help? I'm totally lost here…
That article i 2.5 years old. I wouldn't recommend following it. If you still wants to then you could try to rvm install Ruby 1.8.7. I've never heard of any compability issues between 1.8.6 and 1.8.7.
I would instead recommend that you follow Setting up a Rails Development System on Mac OSX Snow Leopard and from there the regular Getting Started with Rails.

Resources