Advertisement
Guest User

Untitled

a guest
Feb 28th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.51 KB | None | 0 0
  1. Attempt to build perl-Quota 1.7.2 on RHEL8 Beta:
  2.  
  3. [root@5210r ~]# rpm -ql libtirpc-devel |grep rpc.h
  4. /usr/include/tirpc/rpc/rpc.h
  5.  
  6. [root@5210r Quota-1.7.2]# LC_ALL=C make clean
  7.  
  8. [root@5210r Quota-1.7.2]# LC_ALL=C perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="-I/usr/include/tirpc/ -L/lib64 -lrpcsvc"
  9. Using hints/linux.h for myconfig.h
  10. Checking if your kit is complete...
  11. Looks good
  12. Warning (mostly harmless): No library found for -lrpcsvc
  13. Generating a Unix-style Makefile
  14. Writing Makefile for Quota
  15. Writing MYMETA.yml and MYMETA.json
  16.  
  17. [root@5210r Quota-1.7.2]# LC_ALL=C make
  18. cp Quota.pm blib/lib/Quota.pm
  19. AutoSplitting blib/lib/Quota.pm (blib/lib/auto/Quota)
  20. Running Mkbootstrap for Quota ()
  21. chmod 644 "Quota.bs"
  22. "/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Quota.bs blib/arch/auto/Quota/Quota.bs 644
  23. "/usr/bin/perl" "/usr/share/perl5/vendor_perl/ExtUtils/xsubpp" -typemap '/usr/share/perl5/ExtUtils/typemap' Quota.xs > Quota.xsc
  24. mv Quota.xsc Quota.c
  25. rm -f myconfig.h
  26. ln -s hints/linux.h myconfig.h
  27. gcc -c -D_REENTRANT -D_GNU_SOURCE -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/tirpc/ -L/lib64 -lrpcsvc -DVERSION=\"1.7.2\" -DXS_VERSION=\"1.7.2\" -fPIC "-I/usr/lib64/perl5/CORE" Quota.c
  28. Quota.xs: In function 'callaurpc':
  29. Quota.xs:77:1: warning: type of 'prognum' defaults to 'int' [-Wimplicit-int]
  30. callaurpc(host, prognum, versnum, procnum, inproc, in, outproc, out)
  31. ^~~~~~~~~
  32. Quota.xs:77:1: warning: type of 'versnum' defaults to 'int' [-Wimplicit-int]
  33. Quota.xs:77:1: warning: type of 'procnum' defaults to 'int' [-Wimplicit-int]
  34. Quota.xs: In function 'XS_Quota_query':
  35. Quota.xs:349:12: warning: implicit declaration of function 'quotactl'; did you mean 'ioctl'? [-Wimplicit-function-declaration]
  36. err = quotactl(QCMD(Q_XGETQUOTA, ((kind == 2) ? XQM_PRJQUOTA : ((kind == 1) ? XQM_GRPQUOTA : XQM_USRQUOTA))), dev+5, uid, CADR &xfs_dqblk);
  37. ^~~~~~~~
  38. ioctl
  39. gcc -c -D_REENTRANT -D_GNU_SOURCE -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/tirpc/ -L/lib64 -lrpcsvc -DVERSION=\"1.7.2\" -DXS_VERSION=\"1.7.2\" -fPIC "-I/usr/lib64/perl5/CORE" stdio_wrap.c
  40. gcc -c -D_REENTRANT -D_GNU_SOURCE -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/tirpc/ -L/lib64 -lrpcsvc -DVERSION=\"1.7.2\" -DXS_VERSION=\"1.7.2\" -fPIC "-I/usr/lib64/perl5/CORE" linuxapi.c
  41. linuxapi.c: In function 'linuxquota_get_api':
  42. linuxapi.c:146:13: warning: implicit declaration of function 'quotactl'; did you mean 'SYS_quotactl'? [-Wimplicit-function-declaration]
  43. if (quotactl(QCMD(Q_V2_GETSTATS, 0), NULL, 0, (void *)&v2_stats) >= 0) {
  44. ^~~~~~~~
  45. SYS_quotactl
  46. rm -f blib/arch/auto/Quota/Quota.so
  47. gcc -lpthread -shared -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -L/usr/local/lib -fstack-protector-strong Quota.o stdio_wrap.o linuxapi.o -o blib/arch/auto/Quota/Quota.so \
  48. -lperl \
  49.  
  50. chmod 755 blib/arch/auto/Quota/Quota.so
  51. Manifying 1 pod document
  52.  
  53.  
  54. [root@5210r Quota-1.7.2]# LC_ALL=C make install
  55. "/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Quota.bs blib/arch/auto/Quota/Quota.bs 644
  56. Manifying 1 pod document
  57. Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
  58. Installing /usr/lib64/perl5/vendor_perl/auto/Quota/Quota.so
  59. Appending installation info to /usr/lib64/perl5/perllocal.pod
  60.  
  61. #
  62. ### Test:
  63. #
  64.  
  65. [root@5210r ~]# LC_ALL=C /usr/sausalito/constructor/base/user/50_addAdmin.pl
  66. Can't load '/usr/lib64/perl5/vendor_perl/auto/Quota/Quota.so' for module Quota: /usr/lib64/perl5/vendor_perl/auto/Quota/Quota.so: undefined symbol: __rpc_createerr at /usr/lib64/perl5/DynaLoader.pm line 193.
  67. at /usr/sausalito/constructor/base/user/50_addAdmin.pl line 10.
  68. Compilation failed in require at /usr/sausalito/constructor/base/user/50_addAdmin.pl line 10.
  69. BEGIN failed--compilation aborted at /usr/sausalito/constructor/base/user/50_addAdmin.pl line 10.
  70.  
  71. #
  72. ### 'ldd' of resulting Quota.so:
  73. #
  74.  
  75. [root@5210r ~]# LC_ALL=C ldd /usr/lib64/perl5/vendor_perl/auto/Quota/Quota.so
  76. linux-vdso.so.1 (0x00007ffc653d6000)
  77. libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f1642d79000)
  78. libperl.so.5.26 => /lib64/libperl.so.5.26 (0x00007f164296a000)
  79. libc.so.6 => /lib64/libc.so.6 (0x00007f16425a6000)
  80. /lib64/ld-linux-x86-64.so.2 (0x00007f16431a0000)
  81. libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f164238f000)
  82. libdl.so.2 => /lib64/libdl.so.2 (0x00007f164218b000)
  83. libm.so.6 => /lib64/libm.so.6 (0x00007f1641e09000)
  84. libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f1641be0000)
  85. libutil.so.1 => /lib64/libutil.so.1 (0x00007f16419dc000)
  86.  
  87. #
  88. ### Fix:
  89. #
  90.  
  91. After running "perl Makefile.PL" edit the resulting Makefile and change the "MakeMaker const_config section" to this:
  92. # --- MakeMaker const_config section:
  93.  
  94. # These definitions are from config.sh (via /usr/lib64/perl5/Config.pm).
  95. # They may have been overridden via Makefile.PL or on the command line.
  96. AR = ar
  97. CC = gcc
  98. CCCDLFLAGS = -fPIC
  99. CCDLFLAGS = -Wl,--enable-new-dtags -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -ltirpc
  100. DLEXT = so
  101. DLSRC = dl_dlopen.xs
  102. EXE_EXT =
  103. FULL_AR = /usr/bin/ar
  104. LD = gcc
  105. LDDLFLAGS = -lpthread -shared -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -L/lib64 -ltirpc
  106. LDFLAGS = -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fstack-protector-strong -ltirpc -L/lib64
  107. LIBC = libc-2.28.so
  108. LIB_EXT = .a
  109. OBJ_EXT = .o
  110. OSNAME = linux
  111. OSVERS = 4.14.0-49.el7a.noaead.x86_64
  112. RANLIB = :
  113. SITELIBEXP = /usr/local/share/perl5
  114. SITEARCHEXP = /usr/local/lib64/perl5
  115. SO = so
  116. VENDORARCHEXP = /usr/lib64/perl5/vendor_perl
  117. VENDORLIBEXP = /usr/share/perl5/vendor_perl
  118.  
  119. That will then build just fine. This can perhaps be set on the command line during configure, but that didn't seem to work well enough for me.
  120.  
  121. #
  122. ### 'ldd'-ouput from correctly built Quota.so:
  123. #
  124.  
  125. [root@5210r ~]# LC_ALL=C ldd /usr/lib64/perl5/vendor_perl/auto/Quota/Quota.so
  126. linux-vdso.so.1 (0x00007fff78d59000)
  127. libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f6b1d951000)
  128. libtirpc.so.3 => /lib64/libtirpc.so.3 (0x00007f6b1d71e000)
  129. libperl.so.5.26 => /lib64/libperl.so.5.26 (0x00007f6b1d30f000)
  130. libc.so.6 => /lib64/libc.so.6 (0x00007f6b1cf4b000)
  131. /lib64/ld-linux-x86-64.so.2 (0x00007f6b1dd78000)
  132. libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f6b1ccfb000)
  133. libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f6b1ca0b000)
  134. libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f6b1c7ef000)
  135. libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f6b1c5eb000)
  136. libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f6b1c3d4000)
  137. libdl.so.2 => /lib64/libdl.so.2 (0x00007f6b1c1d0000)
  138. libm.so.6 => /lib64/libm.so.6 (0x00007f6b1be4e000)
  139. libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f6b1bc25000)
  140. libutil.so.1 => /lib64/libutil.so.1 (0x00007f6b1ba21000)
  141. libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f6b1b811000)
  142. libcrypto.so.1.1 => /lib64/libcrypto.so.1.1 (0x00007f6b1b339000)
  143. libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f6b1b135000)
  144. libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f6b1af0b000)
  145. libz.so.1 => /lib64/libz.so.1 (0x00007f6b1acf4000)
  146. libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007f6b1aa74000)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement