1

I have a ORACLE/Sun SPARC server with Solaris 10 SPARC OS installed I am attempting to install tsocks-1.8beta4.tar.gz into Solaris However in my PuTTY terminal is the following error....

ld: fatal: library -lc not found

This error is being generated by the saveme.c file within the tsocks directory. It contains the following line I believe is causing the fault

unlink("/etc/ld.so.preload")

I dont have the file ld.so.preload inside my Solaris 10 SPARC OS What shall I do next?

1 Answers1

0

tsocks makes many, many Linux-specific assumptions, such as /etc/ld.so.preload being used, and attempting to statically link portions of the tsocks package.

Solaris 10 does not have a static libc.a. You can not statically link any executable on Solaris 10 and later against system libraries such as libc and libm.

See Static Linking - where did it go?:

With Solaris 10 you can no longer build a static executable. It's not that ld(1) doesn't allow static linking, or using archives, it's just that libc.a, the archive version of libc.so.1, is no longer provided. This library provides the interfaces between user land and the kernel, and without this library it is rather hard to create any form of application.

We've been warning users against static linking for some time now, and linking against libc.a has been especially problematic. Every solaris release, or update (even some patches) has resulted in some application that was built against libc.a, failing. The problem is that libc is supposed to isolate an application from the user/kernel boundary, a boundary which can undergo changes from release to release.

If an application is built against libc.a, then any kernel interface it references is extracted from the archive and becomes a part of the application. Thus, this application can only run on a kernel that is in-sync with the kernel interfaces used. Should these interfaces change, the application is treading on shaky ground.

...

Community
  • 1
  • 1
Andrew Henle
  • 32,625
  • 3
  • 24
  • 56
  • Thanks for your input Andrew. Is there anyway I can get tsocks installed on Solaris 10? I ask because even though I have successfully compiled and installed tor source code 0.2.1.21 - when I type in torify into the PuTTY terminal It says that 'tsocks' needs to be installed. If there is anyway you can help I'd be happy – greenelephant Jun 21 '19 at 21:54
  • @greenelephant You'd need to dig through the `tsocks` package and remove all the Linux-specific assumptions, such as trying to statically link `libc` and the `/etc/ld.so.conf` usage. – Andrew Henle Jun 22 '19 at 12:12
  • very well. Ill have to get down to business. thanks for your input! :) – greenelephant Jun 22 '19 at 12:22