check-lib-depends.1 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. .\" $OpenBSD: check-lib-depends.1,v 1.7 2017/04/11 16:00:53 espie Exp $
  2. .\"
  3. .\" Copyright (c) 2010 Marc Espie <espie@openbsd.org>
  4. .\"
  5. .\" Permission to use, copy, modify, and distribute this software for any
  6. .\" purpose with or without fee is hereby granted, provided that the above
  7. .\" copyright notice and this permission notice appear in all copies.
  8. .\"
  9. .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  10. .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  11. .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  12. .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  13. .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  14. .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  15. .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  16. .\"
  17. .Dd $Mdocdate: April 11 2017 $
  18. .Dt CHECK-LIB-DEPENDS 1
  19. .Os
  20. .Sh NAME
  21. .Nm check-lib-depends
  22. .Nd scan port for shared libraries
  23. .Sh SYNOPSIS
  24. .Nm check-lib-depends
  25. .Op Fl fimoqx
  26. .Op Fl B Ar destdir
  27. .Op Fl d Ar pkgrepo
  28. .Op Fl D Ar directory
  29. .Op Fl O Ar dest
  30. .Op Fl S Ar VAR Ns = Ns Ar value
  31. .Op Fl s Ar source
  32. .Op Ar package ...
  33. .Sh DESCRIPTION
  34. .Nm
  35. scans a port or package for shared libraries, and verify that all of them
  36. are properly recorded.
  37. .Pp
  38. .Nm
  39. can either scan files from a built port after the
  40. .Ar fake stage
  41. from the
  42. .Ev WRKINST
  43. directory, or look directly inside a
  44. .Ar package .
  45. .Pp
  46. Likewise, it can also verify dependencies off installed packages,
  47. or figure them out directly from the port directory.
  48. .Pp
  49. .Nm
  50. actually consists of two distinct stages:
  51. .Bl -bullet
  52. .It
  53. scan all binaries inside a package to extract libraries and rpaths,
  54. using
  55. .Xr objdump 1
  56. or
  57. .Xr ldd 1 .
  58. .It
  59. compare those libraries against the port's registered dependencies
  60. and report problems.
  61. .El
  62. .Pp
  63. The options are as follows:
  64. .Bl -tag -width keyword
  65. .It Fl B Ar destdir
  66. Scan files under
  67. .Ar destdir .
  68. .It Fl d Ar pkgrepo
  69. Look for all needed packages under directory
  70. .Ar pkgrepo .
  71. .It Fl D Ar directory
  72. Create debug log files under
  73. .Ar directory
  74. that show in more details the run of
  75. .Xr objdump 1 .
  76. .It Fl f
  77. Give full reports of every file that requires a missing library.
  78. .It Fl i
  79. Read packing-list from standard input.
  80. .It Fl m
  81. Always show progress-meter, even if not run from terminal.
  82. .It Fl o
  83. Scan binaries using
  84. .Xr ldd 1 ,
  85. which also works for old a.out binaries, instead of
  86. .Xr objdump 1 ,
  87. which only works for
  88. .Xr elf 5
  89. binaries.
  90. .It Fl O Ar dest
  91. Save result of first stage in file
  92. .Ar dest .
  93. .It Fl q
  94. Be quiet, do not emit
  95. .Sq Extra:
  96. wantlibs unless there's also an actual problem.
  97. .It Fl S Ar var Ns = Ns Ar value
  98. recognize list of libraries listed in a variable, and replace said list
  99. with variable value.
  100. For instance,
  101. .Fl S Ar LIBCXX Ns = Ns Ar stdc++
  102. will replace
  103. .Sq stdc++
  104. with
  105. .Sq ${LIBCXX}
  106. in
  107. .Ev WANTLIB
  108. lists for compatibility with both clang and gcc.
  109. .It Fl s Ar src
  110. Don't scan, directly read result of first stage from file
  111. .Ar src .
  112. .It Fl x
  113. Don't show progress-meter, even if run from terminal.
  114. .El
  115. .Pp
  116. If no
  117. .Ar package
  118. is given, and the
  119. .Fl i
  120. option is used,
  121. .Nm
  122. will retrieve the packing-list from stdin, and scan the package according
  123. to other options.
  124. .Sh SEE ALSO
  125. .Xr ldd 1 ,
  126. .Xr objdump 1 ,
  127. .Xr bsd.port.mk 5 ,
  128. .Xr elf 5