New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-release not being set on libtool generation of php_mapscript.la #4525

Closed
akrherz opened this Issue Nov 14, 2012 · 9 comments

Comments

Projects
None yet
3 participants
@akrherz
Contributor

akrherz commented Nov 14, 2012

(edited issue to be more accurate)

libtool's generation of php_mapscript.la is missing release ID, so the resulting so ends up with .0.0.0 , causing this at installation:

-rwxr-xr-x. 1 root root 1124 Nov 14 10:18 php_mapscript.la
lrwxrwxrwx. 1 root root 22 Nov 14 10:18 php_mapscript.so -> php_mapscript.so.0.0.0
lrwxrwxrwx. 1 root root 22 Nov 14 10:18 php_mapscript.so.0 -> php_mapscript.so.0.0.0
-rwxr-xr-x. 1 root root 1540855 Nov 14 10:18 php_mapscript.so.0.0.0

thank you for the help below to straighten me out on this.

@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Nov 14, 2012

Member

From the libtool page you linked:

Never try to set the interface numbers so that they correspond to the release number of your package.
This is an abuse that only fosters misunderstanding of the purpose of library versions.
Instead, use the -release flag (see Release numbers), but be warned that every release of your package will not be binary compatible with any other release.

so the current behavior seems correct to me, no?

Member

tbonfort commented Nov 14, 2012

From the libtool page you linked:

Never try to set the interface numbers so that they correspond to the release number of your package.
This is an abuse that only fosters misunderstanding of the purpose of library versions.
Instead, use the -release flag (see Release numbers), but be warned that every release of your package will not be binary compatible with any other release.

so the current behavior seems correct to me, no?

@aboudreault

This comment has been minimized.

Show comment
Hide comment
@aboudreault

aboudreault Nov 14, 2012

Member

@tbonfort the problem is the final generated library: which ends with .so.0.0.0

Member

aboudreault commented Nov 14, 2012

@tbonfort the problem is the final generated library: which ends with .so.0.0.0

@akrherz

This comment has been minimized.

Show comment
Hide comment
@akrherz

akrherz Nov 14, 2012

Contributor

Thanks. The problem is that the generated php_mapscript.so is named like so

php_mapscript.so.0.0.0

This causes a problem when it overwrites that file in the php modules folder. Sorry for my ignorance

Contributor

akrherz commented Nov 14, 2012

Thanks. The problem is that the generated php_mapscript.so is named like so

php_mapscript.so.0.0.0

This causes a problem when it overwrites that file in the php modules folder. Sorry for my ignorance

@aboudreault

This comment has been minimized.

Show comment
Hide comment
@aboudreault

aboudreault Nov 14, 2012

Member

not a big deal....... but would be good for 6.2.1.

Member

aboudreault commented Nov 14, 2012

not a big deal....... but would be good for 6.2.1.

@akrherz

This comment has been minimized.

Show comment
Hide comment
@akrherz

akrherz Nov 14, 2012

Contributor

Oh, the problem is that the libtool command in the php mapscript folder is not setting -release

Contributor

akrherz commented Nov 14, 2012

Oh, the problem is that the libtool command in the php mapscript folder is not setting -release

@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Nov 14, 2012

Member

The 0.0.0 is what is expected as it's the first release using libtool. If you had betas or pre-release code installed before, then yes I agree that it will have been overwritten.

Member

tbonfort commented Nov 14, 2012

The 0.0.0 is what is expected as it's the first release using libtool. If you had betas or pre-release code installed before, then yes I agree that it will have been overwritten.

@ghost ghost assigned tbonfort Nov 14, 2012

@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Nov 14, 2012

Member

I'll take care of adding version-info for coming releases, and add -release for php mapscript.

Member

tbonfort commented Nov 14, 2012

I'll take care of adding version-info for coming releases, and add -release for php mapscript.

@akrherz

This comment has been minimized.

Show comment
Hide comment
@akrherz

akrherz Nov 14, 2012

Contributor

For my sanity and attempt to learn something, this is the proper patch?

diff --git a/mapscript/php/Makefile.in b/mapscript/php/Makefile.in
index 20c9adb..baf71dd 100644
--- a/mapscript/php/Makefile.in
+++ b/mapscript/php/Makefile.in
@@ -63,6 +63,11 @@ CFLAGS = @CFLAGS@ @USE_PHP_REGEX@ -DCOMPILE_DL=1 @PHP_VERSION_FLAG@
 PHP_INC = `$(PHPCONFIG) --includes ` @APACHE_INC@

 #
+### MS_VERSION - Set by configure based in mapserver.h
+#
+MS_VERSION=     @MS_VERSION@
+
+#
 # IMPORTANT NOTE ABOUT REGEX FOR PHP_MAPSCRIPT USERS:
 #
 # In order to compile the PHP_MAPSCRIPT module, we have to make MapServer
@@ -114,10 +119,10 @@ PHPPROJ_OBJS = php_mapscript_util.$(OBJ_SUFFIX) php_proj.$(OBJ_SUFFIX) $(PHP_REG


 php_mapscript.la: $(PHPMS_OBJS) ../../libmapserver.la
-       $(LINK) -o $@ $(PHPMS_OBJS) $(MS_LIBS)
+       $(LINK) -release $(MS_VERSION) -o $@ $(PHPMS_OBJS) $(MS_LIBS)

 php_proj.la:  $(PHPPROJ_OBJS) ../libmapserver.la
-       $(LINK) -o $@ $(PHPPROJ_OBJS) $(MS_LIBS)
+       $(LINK) -release $(MS_VERSION) -o $@ $(PHPPROJ_OBJS) $(MS_LIBS)

 %.lo: %.c php_mapscript_util.h php_mapscript.h
        $(LTCC) $(CC) $(CFLAGS112) -c -o $@ $<

If not, I'll shut up now and stop wasting your time. Thank you for the quick responses.

Contributor

akrherz commented Nov 14, 2012

For my sanity and attempt to learn something, this is the proper patch?

diff --git a/mapscript/php/Makefile.in b/mapscript/php/Makefile.in
index 20c9adb..baf71dd 100644
--- a/mapscript/php/Makefile.in
+++ b/mapscript/php/Makefile.in
@@ -63,6 +63,11 @@ CFLAGS = @CFLAGS@ @USE_PHP_REGEX@ -DCOMPILE_DL=1 @PHP_VERSION_FLAG@
 PHP_INC = `$(PHPCONFIG) --includes ` @APACHE_INC@

 #
+### MS_VERSION - Set by configure based in mapserver.h
+#
+MS_VERSION=     @MS_VERSION@
+
+#
 # IMPORTANT NOTE ABOUT REGEX FOR PHP_MAPSCRIPT USERS:
 #
 # In order to compile the PHP_MAPSCRIPT module, we have to make MapServer
@@ -114,10 +119,10 @@ PHPPROJ_OBJS = php_mapscript_util.$(OBJ_SUFFIX) php_proj.$(OBJ_SUFFIX) $(PHP_REG


 php_mapscript.la: $(PHPMS_OBJS) ../../libmapserver.la
-       $(LINK) -o $@ $(PHPMS_OBJS) $(MS_LIBS)
+       $(LINK) -release $(MS_VERSION) -o $@ $(PHPMS_OBJS) $(MS_LIBS)

 php_proj.la:  $(PHPPROJ_OBJS) ../libmapserver.la
-       $(LINK) -o $@ $(PHPPROJ_OBJS) $(MS_LIBS)
+       $(LINK) -release $(MS_VERSION) -o $@ $(PHPPROJ_OBJS) $(MS_LIBS)

 %.lo: %.c php_mapscript_util.h php_mapscript.h
        $(LTCC) $(CC) $(CFLAGS112) -c -o $@ $<

If not, I'll shut up now and stop wasting your time. Thank you for the quick responses.

@tbonfort tbonfort closed this in 7364f12 Dec 11, 2012

@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Dec 11, 2012

Member

@akrherz sorry for not responding, I've applied your patch now, which somewhat implies it seemed like the proper one :) .
thanks,
thomas

Member

tbonfort commented Dec 11, 2012

@akrherz sorry for not responding, I've applied your patch now, which somewhat implies it seemed like the proper one :) .
thanks,
thomas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment