patchGNU Autoconf Archive - Patches: patch #7953, Make AX_PYTHON_DEVEL work on Arch...

 
 

patch #7953: Make AX_PYTHON_DEVEL work on Arch Linux

Submitted by:  Daniel Müllner <muellner>
Submitted on:  Mon Feb 18 22:11:29 2013  
 
Priority: 5 - NormalStatus: Done
Assigned to: Peter Simons <simons>Open/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Thu Apr 4 10:09:35 2013, comment #14:

I pushed the latest version of the macro in commit ca8373b5907cc64384169dc645163da82683895a. Thank you very much for your efforts, guys!

Peter Simons <simons>
Project AdministratorIn charge of this item.
Wed Apr 3 16:58:15 2013, comment #13:

that approach looks fine too me.
It also works on the mac.

another minor nitpick in that macro, the library variable should be named PYTHON_LIBS not PYTHON_LDFLAGS as LDFLAGS has a different placement on the commandline than LIBS, which is relevant for static linking (and shared with ld --as-needed)
Not sure if thats worth fixing though.

Julian Taylor <jtaylor>
Tue Apr 2 20:53:06 2013, comment #12:

Thanks for the notice, Julian. I looked into the Makefile that is shipped with Python, and how the compiler flags are generated there. The Makefile (in /usr/lib/python3.3/config-3.3m on my system) contains the following line:

BLDLIBRARY= -L. -lpython$(LDVERSION)

So, why not do the same? Attached is a script that uses the configuration variable LDVERSION (or VERSION if LDVERSION is not defined) instead of LDLIBRARY, SO and SOABI. The script becomes even simpler that way.

Julian (or someone else), could you comment on whether this work on MacOS?

(file #27748)

Daniel Müllner <muellner>
Tue Apr 2 17:03:27 2013, comment #11:

this patch will probably break on macos
There the SO variable expands to .so, but the library is libpythonX.Y.dylib

also it won't work if python is built with debugging, then SO returns _d.so not .so on linux

Julian Taylor <jtaylor>
Tue Mar 26 00:52:23 2013, comment #10:

Okay, very cool. I've pushed your patch in 8af26ec0cbb410219dac0e3f8e9cb5901f96fb27. Thank you very much!

Peter Simons <simons>
Project AdministratorIn charge of this item.
Mon Mar 25 23:28:08 2013, comment #9:

No, the patch hasn't taken the other changes into account. To me, they do not seem to conflict, however. Attached please find my suggestion how to merge these two changes. It works on my system (Arch Linux), and I do not believe that the merged version compromises anything which the other patch fixed for Ubuntu.

(file #27687)

Daniel Müllner <muellner>
Mon Mar 25 23:13:13 2013, comment #8:

Does the file attachment #27682 from today take the changes from 6cb46950666b6609e931a599fc1c5317dc62a84b into account?

I tried to merge your changes into the current version of the macro, but it seemed to me like the two patches conflict and I wasn't sure how to fix the merge.

Peter Simons <simons>
Project AdministratorIn charge of this item.
Mon Mar 25 18:01:59 2013, comment #7:

Another typo! The corrected file is attached.

(file #27682)

Daniel Müllner <muellner>
Fri Mar 15 20:49:48 2013, comment #6:

Oops, I just noticed a typo. The attached file should work now. Please ignore file #27580 from comment #5 and take this one.

(file #27610)

Daniel Müllner <muellner>
Fri Mar 8 23:45:59 2013, comment #5:

The NumPy distutils have a method to determine the correct ending for shared libraries. I took the relevant code snippet from there and inserted it into the AX_PYTHON_DEVEL macro. In my opinion, this qualifies now as a permanent, OS-independent solution. Peter, would you update the file in the "testing" branch with the attached file?

(file #27580)

Daniel Müllner <muellner>
Tue Feb 26 09:44:55 2013, comment #4:

I am not aware of an Autoconf macro that determines the suffix used by shared libraries. I thought that Libtool might provide that information somehow, but apparently it doesn't. It seems weird that such an elementary portability issue isn't addressed by the Autotools.

Peter Simons <simons>
Project AdministratorIn charge of this item.
Wed Feb 20 20:46:58 2013, comment #3:

One more comment: the proposed solution is not optimal as it guesses the ending ".so" for dynamic libraries, but that might not hold on every system. There must be a way to determine the ending for dynamic libraries within Autoconf. Is there a macro or a variable that does the job and gives me ".so", ".dll" or else, depending on the platform? I'm willing to improve the existing patch but don't know how to proceed. Any help?

Daniel Müllner <muellner>
Tue Feb 19 09:24:09 2013, comment #2:

Pushed in commit 5f8f5b4348a1ae6df0eedbaef24a48c94d5c1eb5. Thank you very much for the update!

Peter Simons <simons>
Project AdministratorIn charge of this item.
Mon Feb 18 22:26:53 2013, comment #1:

Tested-by: Ben Widawsky <ben@bwidawsk.net>

Anonymous
Mon Feb 18 22:11:29 2013, original submission:

Arch Linux uses the ending ".so" for its main Python3 library (as in "libpython3.3m.so") but Python3 itself reports the desired ending for dynamic libraries as ".cpython-33m.so". This confused AX_PYTHON_DEVEL when it tried to strip the ending from libpython. The attached fix tries to strip the ending $ac_python_soext from the library file name first (as before). If that does not work, it additionally tries to strip ".so".

(This issue is independent from my recently submitted patch here:

https://savannah.gnu.org/patch/?7951

However, both patches are necessary to make the Python-related autoconf macros work on Arch Linux.)

Daniel Müllner <muellner>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #27748:  ax_python_devel.m4 added by muellner (11kB - application/x-m4)
file #27687:  ax_python_devel.m4 added by muellner (12kB - application/x-m4)
file #27682:  ax_python_devel.m4 added by muellner (11kB - application/x-m4)
file #27610:  ax_python_devel.m4 added by muellner (12kB - application/x-m4)
file #27580:  ax_python_devel.m4 added by muellner (12kB - application/x-m4 - Final solution.)
file #27481:  ax_python_devel.m4 added by muellner (11kB - application/x-m4)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jtaylor (Posted a comment)
  • -unavailable- added by simons
  • -unavailable- added by simons (Posted a comment)
  • -unavailable- added by simons
  • -unavailable- added by simons
  • -unavailable- added by simons
  • -unavailable- added by simons
  • -unavailable- added by muellner (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 17 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat Apr 6 13:00:02 2013simonsStatusReady For Test=>Done
      Open/ClosedOpen=>Closed
    Tue Apr 2 20:53:06 2013muellnerAttached File-=>Added ax_python_devel.m4, #27748
    Tue Mar 26 00:52:23 2013simonsStatusNeed Info=>Ready For Test
    Mon Mar 25 23:28:08 2013muellnerAttached File-=>Added ax_python_devel.m4, #27687
    Mon Mar 25 23:13:13 2013simonsStatusReady For Test=>Need Info
      Carbon-Copy-=>Added jtaylor
    Mon Mar 25 18:01:59 2013muellnerAttached File-=>Added ax_python_devel.m4, #27682
    Fri Mar 15 20:49:48 2013muellnerAttached File-=>Added ax_python_devel.m4, #27610
    Fri Mar 8 23:45:58 2013muellnerAttached File-=>Added ax_python_devel.m4, #27580
    Tue Feb 19 09:24:09 2013simonsStatusNone=>Ready For Test
      Assigned toNone=>simons
      Carbon-Copy-=>Added sebastian huber
      Carbon-Copy-=>Added rafael laboissiere
      Carbon-Copy-=>Added matteo settenvini
      Carbon-Copy-=>Added horst knorr
    Mon Feb 18 22:11:29 2013muellnerAttached File-=>Added ax_python_devel.m4, #27481

    Back to the top


    Powered by Savane 3.1-cleanup