Subject: RE: [libssh2] #252: Compilation Error on RedHat el5 64bit.

RE: [libssh2] #252: Compilation Error on RedHat el5 64bit.

From: Robert-Jean Denault <Robert-jean.Denault_at_telus.com>
Date: Tue, 13 Nov 2012 09:54:57 -0500

Hello libssh2,

I have worked around the issue. The problem was caused by the fact the compilation environment used have the 1.2.6 version of the libraries, and all its include files installed. When the make ran the compiler settings caused it to use the older installed version of the headers instead of using the newer include files from the locate src directory.

To get around the issue I had to uninstall the old library and its include files.

The settings should be updated to search for the headers from the src distribution first, and then search the installed include paths.

Should you have any questions or concerns please do not hesitate to contact me
Robert Denault
Programmeur-analyste principal II/ Senior Programmer-Analyst II
TELUS Solutions en santé | avec l’expertise d’Emergis
TELUS Health Solutions | backed by Emergis
T : (450) 928 6000 x 3740
T : 1 (866) 363 7447 x 3740
robert.denault_at_telus.com
telussante.com telushealth.com

Le présent courriel et tout document joint sont destinés uniquement à la personne ou à l’entité à qui il est adressé et peut contenir des renseignements confidentiels. Si vous n’êtes pas le destinataire visé, veuillez nous en informer sans délai et détruire le courriel et les documents ainsi que toute copie qui en aurait été faite. Merci.
This message and any accompanying attachments are intended only for the person(s) to whom this message is addressed and may contain privileged, proprietary and/or confidential information. Any unauthorized use, disclosure, reproduction or distribution of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately and permanently delete or destroy this message, including any attachments. Thank you.
.

-----Message d'origine-----
De : libssh2 Trac [mailto:trac_at_libssh2.stuge.se]
Envoyé : November 13, 2012 5:57 AM
Cc : libssh2-devel_at_cool.haxx.se
Objet : [libssh2] #252: Compilation Error on RedHat el5 64bit.

#252: Compilation Error on RedHat el5 64bit.
----------------------+-----------------------
 Reporter: rdenault | Owner: rdenault
     Type: defect | Status: new
 Priority: high | Milestone: 1.4.3
Component: API | Version: 1.4.2
 Keywords: | Blocked By:
   Blocks: |
----------------------+-----------------------
 When compiling libssh2 on RedHat I get compilation errors. I have tried with older releases, and all releases from 1.4.2 to 1.2.8 fail. Only 1.2.6, and 1.2.7 compile successfully.

 Configure options:
 INCLUDES=-I/opt2/local/include
 LDFLAGS=-L/opt2/local/lib64
 export INCLUDES LDFLAGS
 ./configure --enable-rpath --prefix=/opt2/local --libdir=/opt2/local/lib64 --with-gnu-ld --with-libssl-prefix=/opt2/local --with-libz

 Configuration Summary of build options:

   version: 1.4.2
   Host type: x86_64-unknown-linux-gnu
   Install prefix: /opt2/local
   Compiler: gcc
   Compiler flags: -g -O2
   Library types: Shared=yes, Static=yes
   Crypto library: openssl: yes (AES-CTR: no) libgcrypt: no
   Debug build: no
   Build examples: yes
   Path to sshd: /usr/sbin/sshd (only for self-tests)
   libz compression: yes

 Result of Make:
 -bash-3.2# make
 Making all in src
 make[1]: Entering directory
 `/home/builder/downloads/libssh2/libssh2-1.4.2/src'
 make all-am
 make[2]: Entering directory
 `/home/builder/downloads/libssh2/libssh2-1.4.2/src'
 if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H
 -I/opt2/local/include -I../include -I../src -g -O2 -MT channel.lo -MD
 -MP -MF ".deps/channel.Tpo" -c -o channel.lo channel.c; \
         then mv -f ".deps/channel.Tpo" ".deps/channel.Plo"; else rm -f ".deps/channel.Tpo"; exit 1; fi
 libtool: compile: gcc -DHAVE_CONFIG_H -I/opt2/local/include -I../include -I../src -g -O2 -MT channel.lo -MD -MP -MF .deps/channel.Tpo -c channel.c -fPIC -DPIC -o .libs/channel.o In file included from channel.c:41:
 libssh2_priv.h:564: error: expected specifier-qualifier-list before 'LIBSSH2_SEND_FUNC'
 libssh2_priv.h:1000: error: expected ')' before 'socket'
 libssh2_priv.h:1002: error: expected ')' before 'socket'
 channel.c: In function '_libssh2_channel_nextid':
 channel.c:64: error: 'LIBSSH2_SESSION' has no member named 'next_channel'
 channel.c:67: error: 'LIBSSH2_SESSION' has no member named 'channels'
 channel.c:83: error: 'LIBSSH2_SESSION' has no member named 'next_channel'
 channel.c: In function '_libssh2_channel_locate':
 channel.c:100: error: 'LIBSSH2_SESSION' has no member named 'channels'
 channel.c:110: error: 'LIBSSH2_SESSION' has no member named 'listeners'
 channel.c: In function '_libssh2_channel_open':
 channel.c:144: error: 'LIBSSH2_SESSION' has no member named 'open_state'
 channel.c:145: error: 'LIBSSH2_SESSION' has no member named 'open_channel'
 channel.c:146: error: 'LIBSSH2_SESSION' has no member named 'open_packet'
 channel.c:147: error: 'LIBSSH2_SESSION' has no member named 'open_data'
 channel.c:150: error: 'LIBSSH2_SESSION' has no member named 'open_packet_len'
 channel.c:151: error: 'LIBSSH2_SESSION' has no member named 'open_local_channel'
 channel.c:154: error: 'LIBSSH2_SESSION' has no member named 'open_packet_requirev_state'
 channel.c:155: error: 'LIBSSH2_SESSION' has no member named 'open_packet_requirev_state'
 channel.c:160: error: 'LIBSSH2_SESSION' has no member named 'open_channel'
 channel.c:162: error: 'LIBSSH2_SESSION' has no member named 'open_channel'
 channel.c:167: error: 'LIBSSH2_SESSION' has no member named 'open_channel'
 channel.c:169: error: 'LIBSSH2_SESSION' has no member named 'open_channel'
 channel.c:170: error: 'LIBSSH2_SESSION' has no member named 'open_channel'
 channel.c:172: error: 'LIBSSH2_SESSION' has no member named 'open_channel'
 channel.c:175: error: 'LIBSSH2_SESSION' has no member named 'open_channel'
 channel.c:176: error: 'LIBSSH2_SESSION' has no member named 'open_channel'
 channel.c:179: error: 'LIBSSH2_SESSION' has no member named 'open_channel'
 channel.c:183: error: 'LIBSSH2_SESSION' has no member named 'open_channel'
 channel.c:183: error: 'LIBSSH2_SESSION' has no member named 'open_local_channel'
 channel.c:184: error: 'LIBSSH2_SESSION' has no member named 'open_channel'
 channel.c:185: error: 'LIBSSH2_SESSION' has no member named 'open_channel'
 channel.c:186: error: 'LIBSSH2_SESSION' has no member named 'open_channel'
 channel.c:187: error: 'LIBSSH2_SESSION' has no member named 'open_channel'
 channel.c:189: error: 'LIBSSH2_SESSION' has no member named 'channels'
 channel.c:190: error: 'LIBSSH2_SESSION' has no member named 'open_channel'
 channel.c:192: error: 'LIBSSH2_SESSION' has no member named 'open_packet'
 channel.c:193: error: 'LIBSSH2_SESSION' has no member named 'open_packet_len'
 channel.c:194: error: 'LIBSSH2_SESSION' has no member named 'open_packet'
 channel.c:201: error: 'LIBSSH2_SESSION' has no member named 'open_local_channel'
 channel.c:207: error: 'LIBSSH2_SESSION' has no member named 'open_state'
 channel.c:210: error: 'LIBSSH2_SESSION' has no member named 'open_state'
 channel.c:212: error: 'LIBSSH2_SESSION' has no member named 'open_packet'
 channel.c:213: error: 'LIBSSH2_SESSION' has no member named 'open_packet_len'
 channel.c:226: error: 'LIBSSH2_SESSION' has no member named 'open_state'
 channel.c:229: error: 'LIBSSH2_SESSION' has no member named 'open_state'
 channel.c:231: error: 'LIBSSH2_SESSION' has no member named 'open_data'
 channel.c:232: error: 'LIBSSH2_SESSION' has no member named 'open_data_len'
 channel.c:233: error: 'LIBSSH2_SESSION' has no member named 'open_packet'
 channel.c:235: error: 'LIBSSH2_SESSION' has no member named 'open_packet_requirev_state'
 channel.c:243: error: 'LIBSSH2_SESSION' has no member named 'open_data'
 channel.c:244: error: 'LIBSSH2_SESSION' has no member named 'open_channel'
 channel.c:245: error: 'LIBSSH2_SESSION' has no member named 'open_data'
 channel.c:246: error: 'LIBSSH2_SESSION' has no member named 'open_channel'
 channel.c:247: error: 'LIBSSH2_SESSION' has no member named 'open_data'
 channel.c:248: error: 'LIBSSH2_SESSION' has no member named 'open_channel'
 channel.c:249: error: 'LIBSSH2_SESSION' has no member named 'open_data'
 channel.c:250: error: 'LIBSSH2_SESSION' has no member named 'open_channel'
 channel.c:251: error: 'LIBSSH2_SESSION' has no member named 'open_data'
 channel.c:261: error: 'LIBSSH2_SESSION' has no member named 'open_packet'
 channel.c:262: error: 'LIBSSH2_SESSION' has no member named 'open_packet'
 channel.c:263: error: 'LIBSSH2_SESSION' has no member named 'open_data'
 channel.c:264: error: 'LIBSSH2_SESSION' has no member named 'open_data'
 channel.c:266: error: 'LIBSSH2_SESSION' has no member named 'open_state'
 channel.c:267: error: 'LIBSSH2_SESSION' has no member named 'open_channel'
 channel.c:270: error: 'LIBSSH2_SESSION' has no member named 'open_data'
 channel.c:278: error: 'LIBSSH2_SESSION' has no member named 'open_data'
 channel.c:279: error: 'LIBSSH2_SESSION' has no member named 'open_data'
 channel.c:280: error: 'LIBSSH2_SESSION' has no member named 'open_data'
 channel.c:282: error: 'LIBSSH2_SESSION' has no member named 'open_packet'
 channel.c:283: error: 'LIBSSH2_SESSION' has no member named 'open_packet'
 channel.c:284: error: 'LIBSSH2_SESSION' has no member named 'open_packet'
 channel.c:286: error: 'LIBSSH2_SESSION' has no member named 'open_channel'
 channel.c:288: error: 'LIBSSH2_SESSION' has no member named 'open_channel'
 channel.c:290: error: 'LIBSSH2_SESSION' has no member named 'open_channel'
 channel.c:293: error: 'LIBSSH2_SESSION' has no member named 'open_channel'
 channel.c:295: error: 'LIBSSH2_SESSION' has no member named 'open_data'
 channel.c:296: error: 'LIBSSH2_SESSION' has no member named 'open_data_len'
 channel.c:300: error: 'LIBSSH2_SESSION' has no member named 'open_data'
 channel.c:301: error: 'LIBSSH2_SESSION' has no member named 'open_data_len'
 channel.c:303: error: 'LIBSSH2_SESSION' has no member named 'open_data'
 channel.c:304: error: 'LIBSSH2_SESSION' has no member named 'open_data'
 channel.c:307: error: 'LIBSSH2_SESSION' has no member named 'open_channel'
 channel.c:308: error: 'LIBSSH2_SESSION' has no member named 'open_channel'
 channel.c:311: error: 'LIBSSH2_SESSION' has no member named 'open_state'
 channel.c: In function 'libssh2_channel_open_ex':
 channel.c:331: error: 'LIBSSH2_SESSION' has no member named 'api_block_mode'
 channel.c: In function 'channel_direct_tcpip':
 channel.c:351: error: 'LIBSSH2_SESSION' has no member named 'direct_state'
 channel.c:352: error: 'LIBSSH2_SESSION' has no member named 'direct_host_len'
 channel.c:353: error: 'LIBSSH2_SESSION' has no member named 'direct_shost_len'
 channel.c:355: error: 'LIBSSH2_SESSION' has no member named 'direct_message_len'
 channel.c:356: error: 'LIBSSH2_SESSION' has no member named 'direct_host_len'
 channel.c:356: error: 'LIBSSH2_SESSION' has no member named 'direct_shost_len'
 channel.c:362: error: 'LIBSSH2_SESSION' has no member named 'direct_message'
 channel.c:363: error: 'LIBSSH2_SESSION' has no member named 'direct_message_len'
 channel.c:364: error: 'LIBSSH2_SESSION' has no member named 'direct_message'
 channel.c:369: error: 'LIBSSH2_SESSION' has no member named 'direct_host_len'
 channel.c:371: error: 'LIBSSH2_SESSION' has no member named 'direct_shost_len'
 channel.c:380: error: 'LIBSSH2_SESSION' has no member named 'direct_message'
 channel.c:381: error: 'LIBSSH2_SESSION' has no member named 'direct_message_len'
 channel.c:387: error: 'LIBSSH2_SESSION' has no member named 'direct_state'
 channel.c:391: error: 'LIBSSH2_SESSION' has no member named 'direct_state'
 channel.c:393: error: 'LIBSSH2_SESSION' has no member named 'direct_message'
 channel.c:394: error: 'LIBSSH2_SESSION' has no member named 'direct_message'
 channel.c: In function 'libssh2_channel_direct_tcpip_ex':
 channel.c:413: error: 'LIBSSH2_SESSION' has no member named 'api_block_mode'
 channel.c: In function 'channel_forward_listen':
 channel.c:435: error: 'LIBSSH2_SESSION' has no member named 'fwdLstn_state'
 channel.c:436: error: 'LIBSSH2_SESSION' has no member named 'fwdLstn_host_len'
 channel.c:439: error: 'LIBSSH2_SESSION' has no member named 'fwdLstn_packet_len'
 channel.c:440: error: 'LIBSSH2_SESSION' has no member named 'fwdLstn_host_len'
 channel.c:443: error: 'LIBSSH2_SESSION' has no member named 'fwdLstn_packet_requirev_state'
 channel.c:444: error: 'LIBSSH2_SESSION' has no member named 'fwdLstn_packet_requirev_state'
 channel.c:450: error: 'LIBSSH2_SESSION' has no member named 'fwdLstn_packet'
 channel.c:451: error: 'LIBSSH2_SESSION' has no member named 'fwdLstn_packet_len'
 channel.c:452: error: 'LIBSSH2_SESSION' has no member named 'fwdLstn_packet'
 channel.c:462: error: 'LIBSSH2_SESSION' has no member named 'fwdLstn_host_len'
 channel.c:465: error: 'LIBSSH2_SESSION' has no member named 'fwdLstn_state'
 channel.c:468: error: 'LIBSSH2_SESSION' has no member named 'fwdLstn_state'
 channel.c:470: error: 'LIBSSH2_SESSION' has no member named 'fwdLstn_packet'
 channel.c:471: error: 'LIBSSH2_SESSION' has no member named 'fwdLstn_packet_len'
 channel.c:483: error: 'LIBSSH2_SESSION' has no member named 'fwdLstn_packet'
 channel.c:484: error: 'LIBSSH2_SESSION' has no member named 'fwdLstn_packet'
 channel.c:485: error: 'LIBSSH2_SESSION' has no member named 'fwdLstn_state'
 channel.c:488: error: 'LIBSSH2_SESSION' has no member named 'fwdLstn_packet'
 channel.c:489: error: 'LIBSSH2_SESSION' has no member named 'fwdLstn_packet'
 channel.c:491: error: 'LIBSSH2_SESSION' has no member named 'fwdLstn_state'
 channel.c:494: error: 'LIBSSH2_SESSION' has no member named 'fwdLstn_state'
 channel.c:499: error: 'LIBSSH2_SESSION' has no member named 'fwdLstn_packet_requirev_state'
 channel.c:505: error: 'LIBSSH2_SESSION' has no member named 'fwdLstn_state'
 channel.c:519: error: 'LIBSSH2_SESSION' has no member named 'fwdLstn_host_len'
 channel.c:529: error: 'LIBSSH2_SESSION' has no member named 'fwdLstn_host_len'
 channel.c:530: error: 'LIBSSH2_SESSION' has no member named 'fwdLstn_host_len'
 channel.c:544: error: 'LIBSSH2_SESSION' has no member named 'listeners'
 channel.c:553: error: 'LIBSSH2_SESSION' has no member named 'fwdLstn_state'
 channel.c:560: error: 'LIBSSH2_SESSION' has no member named 'fwdLstn_state'
 channel.c:565: error: 'LIBSSH2_SESSION' has no member named 'fwdLstn_state'
 channel.c: In function 'libssh2_channel_forward_listen_ex':
 channel.c:584: error: 'LIBSSH2_SESSION' has no member named 'api_block_mode'
 channel.c: In function 'libssh2_channel_forward_cancel':
 channel.c:694: error: 'LIBSSH2_SESSION' has no member named 'api_block_mode'
 channel.c: In function 'channel_forward_accept':
 channel.c:722: error: 'LIBSSH2_SESSION' has no member named 'channels'
 channel.c: In function 'libssh2_channel_forward_accept':
 channel.c:750: error: 'LIBSSH2_SESSION' has no member named 'api_block_mode'
 channel.c: In function 'libssh2_channel_setenv_ex':
 channel.c:871: error: 'LIBSSH2_SESSION' has no member named 'api_block_mode'
 channel.c: In function 'libssh2_channel_request_pty_ex':
 channel.c:991: error: 'LIBSSH2_SESSION' has no member named 'api_block_mode'
 channel.c: In function 'libssh2_channel_request_pty_size_ex':
 channel.c:1064: error: 'LIBSSH2_SESSION' has no member named 'api_block_mode'
 channel.c: In function 'libssh2_channel_x11_req_ex':
 channel.c:1215: error: 'LIBSSH2_SESSION' has no member named 'api_block_mode'
 channel.c: In function 'libssh2_channel_process_startup':
 channel.c:1339: error: 'LIBSSH2_SESSION' has no member named 'api_block_mode'
 channel.c: In function '_libssh2_channel_flush':
 channel.c:1370: error: 'LIBSSH2_SESSION' has no member named 'packets'
 channel.c: In function 'libssh2_channel_flush_ex':
 channel.c:1445: error: 'LIBSSH2_SESSION' has no member named 'api_block_mode'
 channel.c: In function 'libssh2_channel_receive_window_adjust':
 channel.c:1628: error: 'LIBSSH2_SESSION' has no member named 'api_block_mode'
 channel.c: In function 'libssh2_channel_receive_window_adjust2':
 channel.c:1659: error: 'LIBSSH2_SESSION' has no member named 'api_block_mode'
 channel.c: In function 'libssh2_channel_handle_extended_data2':
 channel.c:1705: error: 'LIBSSH2_SESSION' has no member named 'api_block_mode'
 channel.c: In function '_libssh2_channel_read':
 channel.c:1772: error: 'LIBSSH2_SESSION' has no member named 'packets'
 channel.c: In function 'libssh2_channel_read_ex':
 channel.c:1899: error: 'LIBSSH2_SESSION' has no member named 'api_block_mode'
 channel.c:1904: error: 'LIBSSH2_SESSION' has no member named 'api_block_mode'
 channel.c: In function '_libssh2_channel_packet_data_len':
 channel.c:1922: error: 'LIBSSH2_SESSION' has no member named 'packets'
 channel.c: In function 'libssh2_channel_write_ex':
 channel.c:2107: error: 'LIBSSH2_SESSION' has no member named 'api_block_mode'
 channel.c: In function 'libssh2_channel_send_eof':
 channel.c:2156: error: 'LIBSSH2_SESSION' has no member named 'api_block_mode'
 channel.c: In function 'libssh2_channel_eof':
 channel.c:2175: error: 'LIBSSH2_SESSION' has no member named 'packets'
 channel.c: In function 'libssh2_channel_wait_eof':
 channel.c:2245: error: 'LIBSSH2_SESSION' has no member named 'api_block_mode'
 channel.c: In function '_libssh2_channel_close':
 channel.c:2299: error: 'LIBSSH2_SESSION' has no member named 'socket_state'
 channel.c: In function 'libssh2_channel_close':
 channel.c:2334: error: 'LIBSSH2_SESSION' has no member named 'api_block_mode'
 channel.c: In function 'libssh2_channel_wait_closed':
 channel.c:2395: error: 'LIBSSH2_SESSION' has no member named 'api_block_mode'
 channel.c: In function '_libssh2_channel_free':
 channel.c:2427: error: 'LIBSSH2_SESSION' has no member named 'socket_state'
 channel.c: In function 'libssh2_channel_free':
 channel.c:2501: error: 'LIBSSH2_SESSION' has no member named 'api_block_mode'
 channel.c: In function 'libssh2_channel_window_read_ex':
 channel.c:2528: error: 'LIBSSH2_SESSION' has no member named 'packets'
 make[2]: *** [channel.lo] Error 1
 make[2]: Leaving directory
 `/home/builder/downloads/libssh2/libssh2-1.4.2/src'
 make[1]: *** [all] Error 2
 make[1]: Leaving directory
 `/home/builder/downloads/libssh2/libssh2-1.4.2/src'
 make: *** [all-recursive] Error 1
 -bash-3.2#

--
Ticket URL: <https://trac.libssh2.org/ticket/252>
libssh2 <https://trac.libssh2.org/>
C library for writing portable SSH2 clients
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-11-13