Unable to start self-service on RHEL with CWA for Linux 21.x

Unable to start self-service on RHEL with CWA for Linux 21.x

book

Article ID: CTX316603

calendar_today

Updated On:

Description

This article is intended for Citrix administrators and technical teams only.

The self-service run using CWA Linux 21.x in distributions like RHEL 7.x and CentOS 7.x will fail with ‘CXXABI_1.3.8’ not found and ‘GLIBCXX_3.4.20’ not found.

 

Resolution

The steps below outline a way to work around the problem and get a compatible version of the library (shared object) onto the Endpoint.

The objective here is to take the version of libstdc++.so from a compiled gcc 4.9.4, and for purposes of the CWA Linux(CWAL), use it in place of the default library provided. This can be accomplished either directly on the endpoint or from some other machine and then transferred over to the endpoint.

Optionally, to have a completely installable package, the CWAL’s tarball package can be customized. How to accomplish this is included within the CWAL’s online documentation. It can found under the section “Customize installation”.
  1. Before following any of these steps you may want to make backup copies of some or all of the CWAL installation.   
  2. From a terminal, run the following commands:
    • # download development tools
      yum groupinstall "Development Tools"
      yum install glibc-static libstdc++-static
      
      # download gcc 4.9.4 source code
      wget https://ftp.gnu.org/gnu/gcc/gcc-4.9.4/gcc-4.9.4.tar.gz
      
      # extract
      tar -zxvf gcc-4.9.4.tar.gz
      
      # download prerequisites
      cd gcc-4.9.4
      ./contrib/download_prerequisites
      
      # generate makefile, build and install gcc
      mkdir build
      cd build
      ../configure --enable-checking=release --enable-languages=c,c++ --disable-multilib
      make
      make install
  3. Now libstdc++.so.6.0.20 could be found in /usr/local/lib64/ folder.
  4. Copy the libstdc++.so.6.0.20  into the root folder of the CWAL, typically this will be /opt/Citrix/ICAClient. This will be the target libstdc++.so version for the following steps.
  5. At this point there are a couple of options to preload the library, but ultimately “export LD_PRELOAD=/opt/Citrix/<name of target libstdc++.so>” must be executed prior to the engine ( wfica and adapter).
  6. The file wfica.sh, which should be in the CWAL root folder, can be used as a script wrapper to preload the library before wfica is executed. The file will need to be modified to export the LD_PRELOAD statement and properly pass arguments to whatever the wfica binary is renamed to in the following step.
  7. The current wfica binary and adapter binary will need to be renamed to something else, for example “wfica.exe” and “adapter.exe”, which will be used for the purpose of this document.
    • cd to the /opt/Citrix/ICAClient folder
      cp wfica wfica.exe
      cp adapter adapter.exe
  8. An example of a modified script wrapper, wfica.sh, could look as follows:
    • #!/bin/sh
      ICAROOT=/opt/Citrix/ICAClient
      export ICAROOT
      LD_LIBRARY_PATH=/opt/Citrix/ICAClient/lib
      export LD_LIBRARY_PATH
      LD_PRELOAD=/opt/Citrix/ICAClient/libstdc++.so.6.0.20
      export LD_PRELOAD
      $ICAROOT/wfica.exe $@
  9. Add another script wrapper for adapter, named adapter.sh, could look as follows:
    • #!/bin/sh
      ICAROOT=/opt/Citrix/ICAClient
      export ICAROOT
      LD_LIBRARY_PATH=/opt/Citrix/ICAClient/lib
      export LD_LIBRARY_PATH
      LD_PRELOAD=/opt/Citrix/ICAClient/libstdc++.so.6.0.20
      export LD_PRELOAD
      $ICAROOT/adapter.exe $@
  10. The modified wfica.sh and adapter.sh will need to be copied over the original wfica binary and adapter binary
    • cd to the /opt/Citrix/ICAClient folder
      cp wfica.sh wfica
      cp adapter.sh adapter

Problem Cause

This is due to the default version of libstdc++.so is lower than libstdc++.so.6.0.20