title: Kylix on Fedora 21
body: <p>we have an application built on Borland Kylix C++. The application is still being used and we maintain a Red Hat 9 virtual machine with the Kylix IDE installed to continue its development. We know it is quite old, but for awhile that´s our choice.</p>
  
  <p>Until Fedora 21, we could run this application without problem, but in this new version our library can´t be loaded, resulting in a segmentation fault error.</p>
  
  <p>That´s the test program to simply load the library:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;dlfcn.h&gt;
  
  void main()
  {
    int *p = dlopen("libX.so", RTLD_NOW);
    if (p == NULL)
    {
      printf("Erro = %s\n", dlerror());
    }
  }
  </code></pre>
  
  <p>The libX.so was built in Kylix C++. The error ocurrs when <code>dlopen</code> executes. We don´t need to load a method or execute a method to get the error. Using strace to analyze the error, we get this:</p>
  
  <pre><code>open("i686/sse2/libborunwind.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
  open("i686/libborunwind.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
  open("sse2/libborunwind.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
  open("libborunwind.so", O_RDONLY|O_CLOEXEC) = 3
  read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\21\0\0004\0\0\0"..., 512) = 512
  fstat64(3, {st_mode=S_IFREG|0755, st_size=27125, ...}) = 0
  close(3)                                = 0
  mprotect(0xb7170000, 4096, PROT_READ)   = 0
  --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0xb85fbad4} ---
  +++ killed by SIGSEGV (core dumped) +++
  </code></pre>
  
  <p>The <code>libborunwind.so</code> is a Kylix runtime library, so we don´t have the source code to see what is going on. It seems the old Kylix libraries are not compatible with the new libraries from Fedora 21 (libc etc).</p>
  
  <p>Is there any way to run old compiled code in a recent Linux distribution?</p>