Building old code

March 1, 2015 | 1 minute read
Text Size 100%:

Author: Darryl Gove

Just been looking at a strange link time error:

Copied to Clipboard
Error: Could not Copy
Copied to Clipboard
Error: Could not Copy
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:

Copied to Clipboard
Error: Could not Copy
Copied to Clipboard
Error: Could not Copy
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:

Copied to Clipboard
Error: Could not Copy
Copied to Clipboard
Error: Could not Copy
[-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.

Guest Author


Previous Post

Programming in C: Few Tidbits #5

Giri Mandalika | 4 min read

Next Post


Hack into AI (1): thoughts beyond installadm

Nikki Serapio | 2 min read
Oracle Chatbot
Disconnected