This wiki is obsolete, see the NorduGrid web pages for up to date information.

VOMS compiling details

From NorduGrid
Jump to navigationJump to search

Warn.png

NOTE: This page is out of date and is kept for purely historical reasons.
VOMS is now available in standard repositories of Red Hat- and Debian-like distributions

The following is a protocol for the compilation of VOMS on an arbitrary Linux or other UNIX-compatible OS. To learn how to build VOMS packages for Debian Linux, follow this link.


roczei@knowarc2:/opt/gpt/sbin$ gpt-flavor-configuration
gcc32dbgpthr:
	AR='/usr/bin/ar'; \
	ARFLAGS='ruv'; \
	CC='/usr/bin/gcc'; \
	CFLAGS='-g    -D_REENTRANT -Wall'; \
	CPP='/usr/bin/gcc -E'; \
	CPPFLAGS=' -I/opt/globus/include -I/opt/globus/include/gcc32dbgpthr'; \
	CXX='/usr/bin/g++'; \
	CXXCPP='/usr/bin/g++ -E'; \
	CXXFLAGS='-g -O0 -g3 -fmessage-length=0 -Wall  '; \
	LDFLAGS=' -L/opt/globus/lib '; \
	LIBS='  -lpthread'; \
	NM='/usr/bin/nm -B'; \
	RANLIB='/usr/bin/ranlib'; \
	configure --with-flavor=gcc32dbgpthr --enable-debug --with-threads=pthreads
gcc32dbg:
	AR='/usr/bin/ar'; \
	ARFLAGS='ruv'; \
	CC='/usr/bin/gcc'; \
	CFLAGS='-g   -Wall'; \
	CPP='/usr/bin/gcc -E'; \
	CPPFLAGS=' -I/opt/globus/include -I/opt/globus/include/gcc32dbg'; \
	CXX='/usr/bin/g++'; \
	CXXCPP='/usr/bin/g++ -E'; \
	CXXFLAGS='-g -O0 -g3 -fmessage-length=0 -Wall '; \
	LDFLAGS=' -L/opt/globus/lib'; \
	NM='/usr/bin/nm -B'; \
	RANLIB='/usr/bin/ranlib'; \
	configure --with-flavor=gcc32dbg --enable-debug
roczei@knowarc2:/opt/gpt/sbin$


Steps:

1. VOMS downloaded from the nordugrid repository:

VOMS version: 1.7.22-3ng

http://download.nordugrid.org/software/voms/releases/1.7.22-3ng/src/

Used patches:

patch -p 1 < voms-isoc90_portability.patch
patch -p 1 < voms-missing_include.patch
patch -p 1 < voms-openssl_portability.patch

1. Mattias modifies:

If you are building against a debug threaded flavour av globus there you have to fix a typo (looks like a cut and paste error) in the src/socklib/Makefile.in makefile:

libsock_gcc32dbgpthr_la_CPPFLAGS = \
      -I $(top_srcdir)/src/include \
      -I $(top_srcdir)/src/sslutils \
      $(GLOBUS_GCC32DBG_CFLAGS)

should be:

libsock_gcc32dbgpthr_la_CPPFLAGS = \
      -I $(top_srcdir)/src/include \
      -I $(top_srcdir)/src/sslutils \
      $(GLOBUS_GCC32DBGPTHR_CFLAGS)

and the same for 64 bit:

libsock_gcc64dbgpthr_la_CPPFLAGS = \
      -I $(top_srcdir)/src/include \
      -I $(top_srcdir)/src/sslutils \
      $(GLOBUS_GCC64DBG_CFLAGS)

should be:

libsock_gcc64dbgpthr_la_CPPFLAGS = \
      -I $(top_srcdir)/src/include \
      -I $(top_srcdir)/src/sslutils \
      $(GLOBUS_GCC64DBGPTHR_CFLAGS)

2.

autogen.sh

3.
./configure --disable-java --with-globus-flavor=gcc32dbgpthr

4.

Error message:

cho './'`Client.cpp
mkdir .libs
g++ -DHAVE_CONFIG_H -I. -I../../src/autogen -I ../../src/include -I ../../src/sslutils -O0 -g3 -fmessage-length=0 -Wall -MT libsock_gcc32dbgpthr_la-Client.lo -MD -MP -MF .deps/libsock_gcc32dbgpthr_la-Client.Tpo -c Client.cpp  -fPIC -DPIC -o .libs/libsock_gcc32dbgpthr_la-Client.o
In file included from Client.cpp:32:
../../src/include/credentials.h:19:20: error: gssapi.h: No such file or directory
../../src/include/credentials.h:20:31: error: globus_gss_assist.h: No such file or directory
In file included from Client.cpp:39:
globuswrap.h:16:31: error: globus_gss_assist.h: No such file or directory
../../src/include/credentials.h:34: warning: 'decouple_cred' initialized and declared 'extern'
../../src/include/credentials.h:34: error: 'gss_cred_id_t' was not declared in this scope
../../src/include/credentials.h:34: error: expected primary-expression before 'int'
../../src/include/credentials.h:34: error: expected primary-expression before '*' token
../../src/include/credentials.h:34: error: 'stk' was not declared in this scope

...

Client.cpp:351: error: 'context' was not declared in this scope
Client.cpp:352: error: 'my_recv' cannot be used as a function
Client.cpp:360: error: 'globus_gss_assist_display_status_str' was not declared in this scope
make[2]: *** [libsock_gcc32dbgpthr_la-Client.lo] Error 1
make[2]: Leaving directory `/home/roczei/1.7.22-3ng-new/src/socklib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/roczei/1.7.22-3ng-new/src'
make: *** [all-recursive] Error 1

Resolution:

cd /home/roczei/1.7.22-3ng-new/src/socklib
vim Makefile
I added this -I/opt/globus/include/gcc32dbgpthr/
DEFAULT_INCLUDES = -I/opt/globus/include/gcc32dbgpthr/ -I. -I$(top_builddir)/src/autogen

5.

Error message:

...

libvomsapi_gcc32dbgpthr_la-ccval.o .libs/libvomsapi_gcc32dbgpthr_la-cinterface.o -Wl,--whole-archive ../../../src/replib/.libs/librep.a ../../../src/common/.libs/libutilities.a ../../../src/log/.libs/liblog.a ../../../src/socklib/.libs/libsock_gcc32dbgpthr.a ../../../src/ac/.libs/libccattcert_gcc32dbgpthr.a -Wl,--no-whole-archive  -L/opt/globus/lib /usr/lib/libexpat.so /opt/globus/lib/libglobus_gss_assist_gcc32dbgpthr.so /opt/globus/lib/libglobus_gssapi_gsi_gcc32dbgpthr.so /opt/globus/lib/libglobus_gsi_proxy_core_gcc32dbgpthr.so /opt/globus/lib/libglobus_gsi_credential_gcc32dbgpthr.so /opt/globus/lib/libglobus_gsi_callback_gcc32dbgpthr.so /opt/globus/lib/libglobus_oldgaa_gcc32dbgpthr.so /opt/globus/lib/libglobus_gsi_sysconfig_gcc32dbgpthr.so /opt/globus/lib/libglobus_gsi_cert_utils_gcc32dbgpthr.so /opt/globus/lib/libglobus_openssl_gcc32dbgpthr.so /opt/globus/lib/libglobus_openssl_error_gcc32dbgpthr.so /opt/globus/lib/libglobus_callout_gcc32dbgpthr.so /opt/globus/lib/libglobus_proxy_ssl_gcc32dbgpthr.so /opt/globus/lib/libglobus_common_gcc32dbgpthr.so /opt/globus/lib/libltdl_gcc32dbgpthr.so -ldl -lssl -lcrypto -lpthread -lcrypto_gcc32dbgpthr -L/usr/lib/gcc/i486-linux-gnu/4.1.2 -L/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib -L/lib/../lib -L/usr/lib/../lib -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/i486-linux-gnu/4.1.2/crtendS.o /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/crtn.o  -Wl,-soname -Wl,libvomsapi_gcc32dbgpthr.so.0 -o .libs/libvomsapi_gcc32dbgpthr.so.0.0.0
/usr/bin/ld: cannot find -lcrypto_gcc32dbgpthr
collect2: ld returned 1 exit status
make[3]: *** [libvomsapi_gcc32dbgpthr.la] Error 1
make[3]: Leaving directory `/home/roczei/1.7.22-3ng-new/src/api/ccapi'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/roczei/1.7.22-3ng-new/src/api'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/roczei/1.7.22-3ng-new/src'
make: *** [all-recursive] Error 1
roczei@knowarc2:~/1.7.22-3ng-new$

This error message reason is the globus openssl switch off.

Resolution:

roczei@knowarc2:~/1.7.22-3ng-new$ find /home/roczei/1.7.22-3ng-new -name 'Makefile' | xargs /usr/bin/perl -p -i.bak -e 's:-lcrypto_gcc32dbgpthr:-lcrypto:g;'
roczei@knowarc2:~/1.7.22-3ng-new$

roczei@knowarc2:~/1.7.22-3ng-new$ find /home/roczei/1.7.22-3ng-new -name 'Makefile' | xargs /usr/bin/perl -p -i.bak -e 's:-lcrypto_gcc32dbg:-lcrypto:g;'
roczei@knowarc2:~/1.7.22-3ng-new$

Replace (in every files):

-lcrypto_gcc32dbgpthr --> -lcrypto

-lcrypto_gcc32dbg  --> -lcrypto

6.

Error message:

...
	for file in *.8; do \
	  GZIP= gzip -f ${file}; \
	done)
/bin/sh .././project/mkinstalldirs //opt/glite/share/doc/voms
cp software.pdf capi.pdf c++api.pdf AC-RFC.pdf //opt/glite/share/doc/voms
cp apidoc/api/VOMS_CC_API/latex/refman.pdf //opt/glite/share/doc/voms/VOMS_CC_API.pdf
cp: cannot stat `apidoc/api/VOMS_CC_API/latex/refman.pdf': No such file or directory
make[3]: *** [install-data-hook] Error 1
make[3]: Leaving directory `/home/roczei/1.7.22-3ng-new/doc'
make[2]: *** [install-data-am] Error 2
make[2]: Leaving directory `/home/roczei/1.7.22-3ng-new/doc'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/roczei/1.7.22-3ng-new/doc'
make: *** [install-recursive] Error 1

Resolution:

root@knowarc2:~/1.7.22-3ng-new# cd doc/
root@knowarc2:~/1.7.22-3ng-new/doc# mkdir -p apidoc/api/VOMS_CC_API/latex/
root@knowarc2:~/1.7.22-3ng-new/doc# touch apidoc/api/VOMS_CC_API/latex/refman.pdf
root@knowarc2:~/1.7.22-3ng-new/doc#


7.

Error message:

/bin/sh .././project/mkinstalldirs //opt/glite/share/doc/voms
cp software.pdf capi.pdf c++api.pdf AC-RFC.pdf //opt/glite/share/doc/voms
cp apidoc/api/VOMS_CC_API/latex/refman.pdf //opt/glite/share/doc/voms/VOMS_CC_API.pdf
cp apidoc/api/VOMS_CC_API/latex/refman.ps //opt/glite/share/doc/voms/VOMS_CC_API.ps
cp apidoc/api/VOMS_C_API/latex/refman.pdf //opt/glite/share/doc/voms/VOMS_C_API.pdf
cp: cannot stat `apidoc/api/VOMS_C_API/latex/refman.pdf': No such file or directory
make[3]: *** [install-data-hook] Error 1
make[3]: Leaving directory `/home/roczei/1.7.22-3ng-new/doc'
make[2]: *** [install-data-am] Error 2
make[2]: Leaving directory `/home/roczei/1.7.22-3ng-new/doc'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/roczei/1.7.22-3ng-new/doc'
make: *** [install-recursive] Error 1

Resolution:

root@knowarc2:~/1.7.22-3ng-new# cd doc
root@knowarc2:~/1.7.22-3ng-new/doc# mkdir -p apidoc/api/VOMS_C_API/latex/
root@knowarc2:~/1.7.22-3ng-new/doc# touch apidoc/api/VOMS_C_API/latex/refman.pdf
root@knowarc2:~/1.7.22-3ng-new/doc#