Building old code

Guest Author

Just been looking at a strange link time error:

ld.so.1: lddstub: fatal: tr/dev/nul: open failed: No such file or directory

I got this compiling C++ code that was expecting one of the old Studio compilers (probably Workshop vintage). The clue to figuring out what was wrong was this warning in the build:

CC: Warning: Option -ptr/dev/nul passed to ld, if ld is invoked, ignored otherwise

What was happening was that the library was building using the long-since-deprecated -ptr option. This specified the location of the template repository in really old versions of the Sun compilers. We've long since moved from using a repository for templates. The deprecation process is that the option gets a warning message for a while, then eventually the compiler stops giving the warning and starts ignoring the option. In this case, however, the option gets passed to the linker, and unfortunately it happens to be a meaningful option for the linker:

        [-p auditlib]   identify audit library to accompany this object

So the linker acts on this, and you end up with the fatal link time error.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.