LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices


Reply
  Search this Thread
Old 03-21-2018, 01:36 PM   #1
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,862
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
Compiling Python-2.7.14 on AIX


Well, I did compiler Python-2.7.11 earlier, but that was with configure-option '--disable-shared'.
Now I try to compile it with '--enable-shared'.
It stops when it tries to create libpython2.7.so: for some reason it uses the following option: -Wl,-bI:./Modules/python.exp
In the previous version, there used to be such a file, it contained the symbols exported by the main executable.
Also it there is this bit: -Wl,-hlibpython2.7.so -- this means nothing to the AIX-linker.
Also the -rpath is wrong, too: -rpath /usr/local/lib64/python2.7/lib-dynload should be: -rpath /usr/local/lib64/

Edit: There is symbol BLDSHARED in Makefile, it is used when linking libpython2.7.so and when linking modules. Problem is, they should go into different places: /usr/local/lib/libpython2.7.so vs /usr/local/lib/python2.7/lib-dynload/

Edit: so for the moment, I add this to my compile-script:
Code:
sed_repl $'s;^\t\t''$(BLDSHARED);aix-libtool --mode=link $(CC) -rpath /usr/local/lib64;
           s;-Wl,-h$(INSTSONAME);;
         ' Makefile
PS: here's some random thoughts regarding linking/compiling in AIX

Last edited by NevemTeve; 03-21-2018 at 02:24 PM.
 
Old 03-22-2018, 11:07 AM   #2
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,862

Original Poster
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
Also, the detection of 'rl_pre_input_hook' is broken in configure:
Code:
char rl_pre_input_hook ();
but in readline, it is a function-pointer, not a function.
Code:
rl_hook_func_t *rl_pre_input_hook = (rl_hook_func_t *)NULL;
I'll try this:
Code:
sed_repl 's/char rl_pre_input_hook ();/char (*rl_pre_input_hook) ();/' configure
Edit: the same goes for 'rl_completion_display_matches_hook'

Better now:
Code:
dump -X64 -H /usr/local/bin/python2.7
INDEX  PATH                          BASE                MEMBER              
0      /usr/local/lib64:/usr/lib                                             
1      /usr/local/lib64              libgcc_s.a          shr.o               
2      /usr/local/lib64              libpython2.7.so                         
3      /usr/local/lib64              libutil.so.1                            
4      /usr/local/lib64              libcpotlas.so.1                         
5      /usr/lib                      libpthreads.a       shr_xpg5_64.o       
6      /usr/lib                      libc.a              shr_64.o            

# dump -X -H /usr/local/lib64/libpython2.7.so
INDEX  PATH                          BASE                MEMBER              
0      /usr/local/lib64:/usr/lib                                             
1      /usr/local/lib64              libgcc_s.a          shr.o               
2      /usr/local/lib64              libutil.so.1                            
3      /usr/local/lib64              libcpotlas.so.1                         
4      /usr/lib                      libdl.a             shr_64.o            
5      /usr/lib                      libpthreads.a       shr_xpg5_64.o       
6      /usr/lib                      libc.a              shr_64.o64 -H /usr/local/lib64

# dump -H -X64 /usr/local/lib64/python2.7/lib-dynload/_curses.so
0      /usr/local/lib64:/usr/lib                                             
1      /usr/local/lib64              libgcc_s.a          shr.o               
2      /usr/local/src/Python-2.7.14/.libs libpython2.7.so                         
3      /usr/local/lib64              libutil.so.1                            
4      /usr/local/lib64              libcpotlas.so.1                         
5      /usr/lib                      libcurses.a         shr42_64.o          
6      /usr/lib                      libc.a              shr_64.o
Underlined is the wrong bit

Last edited by NevemTeve; 03-22-2018 at 12:06 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cross compiling python shariefbe Linux - Software 3 03-09-2010 04:18 AM
compiling python program ? mahbouba Linux - Newbie 2 10-28-2008 10:25 PM
Compiling problem on AIX tim1235 AIX 2 11-03-2005 04:14 PM
compiling Python scripts lex1dr Linux - Software 1 06-16-2003 04:24 PM

LinuxQuestions.org > Forums > Other *NIX Forums > AIX

All times are GMT -5. The time now is 08:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration