3

I am trying to compile some components from ptools from illumos source code on Solaris 10, and so far it has been difficult since the build components are not available and the make files in the component (containing the target program) folders do not run. Its like piecing together a jigsaw puzzle, searching for the appropriate definitions to complete gcc compilation. I wonder if there is any easier way.

user55570
  • 448
  • 6
  • 17
  • 1
    Do you require Solaris 10 or can you use an illumos based distribution? – John Mahowald Nov 01 '15 at 16:16
  • I need Solaris 10. – user55570 Nov 01 '15 at 19:35
  • Are the versions of the ptools already provided in /usr/proc/bin on Solaris 10 not enough? – alanc Nov 02 '15 at 05:46
  • I am trying to understand how the tools and the proc files work, hence I was wanting to be able to examine functional source. – user55570 Nov 02 '15 at 06:10
  • 2
    There's no easy way - if you can do it at all. It'd be like trying to compile something for systemd on Red Hat 5. There are significant kernel- and user-space changes introduced back in the Open Solaris days that became part of both Solaris 11 and Illumos. Those changes aren't in Solaris 10. The `ptools` in Solaris 10 work pretty much the same way as those in Open Solaris, Illumos, and Solaris 11 do. But the underlying kernel and `/proc` structures in Solaris 10 are signficantly different, as are the user-space tools used for building. – Andrew Henle Nov 02 '15 at 11:13
  • The question then becomes -- What is the closest available ptools source code for solaris 10? – user55570 Nov 02 '15 at 22:40
  • @user55570 - What specific functionality are you trying to duplicate? – Andrew Henle Nov 03 '15 at 14:54
  • pargs mainly and want to see where how long program args are handled – user55570 Nov 03 '15 at 21:50
  • For `pargs`, there's an initial argument vector address in `/proc/.../psinfo` that can be used if you access the address space of the process to extract the arguments passed to the process. I don't think that changed from Solaris 10 to Solaris 11, so the method used in Solaris 11 probably works fine under 10, even if the 11 code for pargs won't compile under 10. Read the `proc.4` man page closely: http://docs.oracle.com/cd/E26505_01/html/816-5174/proc-4.html#REFMAN4proc-4 – Andrew Henle Nov 04 '15 at 10:37
  • The `psinfo.pr_argv` vector does not consistently work. There are a number of instances where it does not give a valid address. – user55570 Nov 04 '15 at 11:00
  • Could there be a difference caused by the address model of the process being examined? I don't recall if 64- and 32-bit processes have different layouts for `/proc` files, but I suspect they do. Unfortunately I don't have access to a Solaris box right now. – Andrew Henle Nov 04 '15 at 12:21
  • in case you are interested, there is a vritualbox vm instance for solaris 10 at http://www.oracle.com/technetwork/server-storage/solaris11/vmtemplates-vmvirtualbox-1949721.html – user55570 Nov 05 '15 at 06:49

0 Answers0