Changing the name of "libgpg-error" shared library.

Werner Koch wk at gnupg.org
Tue May 6 15:16:08 CEST 2014


On Fri,  2 May 2014 07:15, suraj.krishnaswami at gmail.com said:

> I am currently using the library "libgpg-error", i am able to compile the
> code using, mingw for windows. I want to change the name of the output

Note that this is not a supported way of building libgpg-error.  A POSIX
system with a cross compiler toolchain is required.

> file, from "libgpg-error-0" to suppose "libgpg-error", can you please help
> me, for how to do it.

Please don't do that.  Having the ABI version number in the DLL name is
important.  Without that it will be impossible to change the ABI.

The SO number is set by libtool, which is a tool build during the
configure run from build-aux/ltmain.sh.  Libtool is called by the
automake Makefile directive:

libgpg_error_la_LDFLAGS = -version-info \
  @LIBGPG_ERROR_LT_CURRENT@:@LIBGPG_ERROR_LT_REVISION@:@LIBGPG_ERROR_LT_AGE@ \
  $(no_undefined) $(export_symbols)

which tells libtool the 3-part SO version info out of which it generates
a SO number for the specific platform.  That is done deep in the guts of
libtool:

	    elif test -n "$soname_spec"; then
	      # bleh windows
	      case $host in
              x86_64-*mingw32*)
                func_arith $current - $age
		major=$func_arith_result
		versuffix="6-$major"
		;;
	      *cygwin* | mingw* | *cegcc*)
	        func_arith $current - $age
		major=$func_arith_result
		versuffix="-$major"
		;;
	      esac

As you can see, for 64 bit Windows, libtool also adds a "6" to the
basename of the DLL.  That is a GnuPG tool related hack and might not be
available in other libtool versions.  However, you are not supposed to
change that.

> I am new to using scripts, i am finding it very difficult to understand the
> scripts.

Right, libtool is quite complicated.  For serious hacking of this
software a thorough understanding of Bourne shell scripts and the Unix
system is highly suggested.


Salam-Shalom,

   Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.




More information about the Gnupg-devel mailing list