Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The output of the configure script shows:</p> <pre><code>configure:2691: gcc -Wl,-static conftest.c &gt;&amp;5 ld: 0706-012 The -t flag is not recognized. ld: 0706-012 The -a flag is not recognized. ld: 0706-012 The -t flag is not recognized. ld: 0706-027 The -i flag is ignored. ld: 0706-012 The -c flag is not recognized. collect2: ld returned 255 exit status </code></pre> <p>This indicates that the <code>-Wl</code> option is successfully passing the option to ld, but ld does not recognize the option. As you're using AIX ld, it requires using <code>-dn</code> along with <code>-bsvr4</code> with the link line, so, for example the flags option should read <code>-Wl,-bsvr4 -Wl,-dn</code>.</p> <p>There is a note at the end of the man page for <code>ld</code> on AIX which states that:</p> <blockquote> <p>The application can also have to be linked again whenever an updated release of the operating system is installed. Any application that is statically linked is not binary portable from any fix or release level to any other fix or release level.</p> </blockquote> <p>Depending on the complexity of the final link line for proftpd, you can use the options <code>-bstatic</code> and <code>-bdynamic</code> to prompt the loading of static libraries for specific items; so in my case my final link line looked like:</p> <pre><code>gcc -o proftpd &lt;lots of .o files&gt; -L/home/user/Development/experiments/proftpd-1.3.4d/lib -lsupp -lcrypt -ldl -L/home/user/Development/experiments/proftpd-1.3.4d/lib/libcap -lcap -lpam </code></pre> <p>Now in this case, it means that it depends on libcrypt, which isn't a default shipped library, so I rejig the link line so that it has the <code>-lcrypt</code> wrapped:</p> <pre><code>-Wl,-bstatic -lcrypt -Wl,-bdynamic </code></pre> <p>and now it links with the static version of the crypt library, and no longer mentions it as part of the run-time link dependencies.</p> <p>As an addenda to this, you should only static link the libraries that aren't shipped by default on the OS in question, and I note that proftpd supports dynamically loading modules, which means that you should only statically link the required modules.</p> <p>In general, though, if you're building to deploy on another system, I would advise creating static-only copies of the dependent libraries that you're using and explicitly pass them into the configure options. This keeps the build environment clean from the run-time environment.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload