Author Topic: Porting Libnl  (Read 1940 times)

grinch

  • Administrator
  • Hero Member
  • *****
  • Posts: 1926
  • Reputation: 187
  • the digital grinch who stole your data
    • @DigitalGrinch
  • Badges:
  • iDevices: iPhone 3GS 4.3.3, HTC Evo V 4G ICS
Re: C compiler cannot create executables
« Reply #15 on: June 28, 2012, 08:23:42 pm »
That looks like its asking you to point it to python lib

Code: [Select]
./configure LDFLAGS="-L/usr/lib/Python2.7"
Or something like that, depending on where yours is installed
If I help you or you appreciate my work, clicking that +1 button is the best thanks I could get.

My opinions are my own, you may agree or disagree with them, but they are only just that; opinions
For example: facebook is the microsoft of social networks

http://goo.gl/PiVjI

@DigitalGrinch
https://twitter.com/DigitalGrinch

I follow all iNinjas members back. PM me if I am not following you

Apetrick

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3512
  • Reputation: 90
  • <Apetrick> lank is 1337
  • Badges:
  • iDevices: Ipod Touch 4g
Re: C compiler cannot create executables
« Reply #16 on: June 28, 2012, 08:54:31 pm »
Tried that but its allready simlinked from that to where python is actually installed /var/stash/python2.7.K72r8i/ :-\
<%a12danrulz> Idk, but doing a DoS from an apple device is like fighting a bear with a plastic spork

Trcx528

  • Haxor
  • Hero Member
  • *****
  • Posts: 4502
  • Reputation: 166
  • Google it!
    • iNinjas
  • Badges:
  • Computers: 13" 2011 Macbook Pro, 120 GB SSD and 16 GB of Ram
  • iDevices: None
Re: C compiler cannot create executables
« Reply #17 on: June 29, 2012, 12:38:07 am »
find -name [pP]ython*.h


Apetrick

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3512
  • Reputation: 90
  • <Apetrick> lank is 1337
  • Badges:
  • iDevices: Ipod Touch 4g
Re: C compiler cannot create executables
« Reply #18 on: June 29, 2012, 03:36:52 am »
Should i set that in the LDFLAGS or the PYTHON_LDFLAGS
<%a12danrulz> Idk, but doing a DoS from an apple device is like fighting a bear with a plastic spork

Trcx528

  • Haxor
  • Hero Member
  • *****
  • Posts: 4502
  • Reputation: 166
  • Google it!
    • iNinjas
  • Badges:
  • Computers: 13" 2011 Macbook Pro, 120 GB SSD and 16 GB of Ram
  • iDevices: None
Re: C compiler cannot create executables
« Reply #19 on: June 29, 2012, 03:44:28 am »
PYTHON_CFLAGS=-I/usr/include/python2.5 (or what ever it is)

Don't like seeing ads? Click here to register!

Apetrick

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3512
  • Reputation: 90
  • <Apetrick> lank is 1337
  • Badges:
  • iDevices: Ipod Touch 4g
Re: C compiler cannot create executables
« Reply #20 on: June 29, 2012, 04:14:59 am »


I got that but im going to try something real quick
<%a12danrulz> Idk, but doing a DoS from an apple device is like fighting a bear with a plastic spork

Trcx528

  • Haxor
  • Hero Member
  • *****
  • Posts: 4502
  • Reputation: 166
  • Google it!
    • iNinjas
  • Badges:
  • Computers: 13" 2011 Macbook Pro, 120 GB SSD and 16 GB of Ram
  • iDevices: None
Re: C compiler cannot create executables
« Reply #21 on: June 29, 2012, 04:25:30 am »
Whoops, for some reason I was thinking that you needed to give it the path to the devel headers, but you need the compiled library. 

export PYTHON_CFLAGS=/usr/lib/python/

where /usr/lib/python/ is the folder where the python libraries live...you could try a
dpkg -L | grep lib | grep dylib

to get the path to the python dylib, just provide the path to the folder though (no *.dylib)

Apetrick

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3512
  • Reputation: 90
  • <Apetrick> lank is 1337
  • Badges:
  • iDevices: Ipod Touch 4g
Re: C compiler cannot create executables
« Reply #22 on: June 29, 2012, 04:29:15 am »
There is no PYTHON_CFLAGS Do you want me too add it?
<%a12danrulz> Idk, but doing a DoS from an apple device is like fighting a bear with a plastic spork

Trcx528

  • Haxor
  • Hero Member
  • *****
  • Posts: 4502
  • Reputation: 166
  • Google it!
    • iNinjas
  • Badges:
  • Computers: 13" 2011 Macbook Pro, 120 GB SSD and 16 GB of Ram
  • iDevices: None
Re: C compiler cannot create executables
« Reply #23 on: June 29, 2012, 04:38:59 am »
Wow, I am tired, and forgetful

PYTHON_LDFLAGS=-L/usr/lib/python

Apetrick

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3512
  • Reputation: 90
  • <Apetrick> lank is 1337
  • Badges:
  • iDevices: Ipod Touch 4g
Re: C compiler cannot create executables
« Reply #24 on: June 29, 2012, 04:51:11 am »
Got the same error i looked in the log and this is what led up to the error:
configure:11468: checking consistency of all components of python development environment
configure:11494: gcc -o conftest -g -O2  -I/usr/include/python2.7  conftest.c  -L/usr/lib/python2.7/config -lpython2.7   -ldl  -lpthread -framework CoreFoundation >&5
ld: library not found for -ldl
collect2: ld returned 1 exit status
configure:11494: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "libnl"
| #define PACKAGE_TARNAME "libnl"
| #define PACKAGE_VERSION "3.1"
| #define PACKAGE_STRING "libnl 3.1"
| #define PACKAGE_BUGREPORT "tgraf@suug.ch"
| #define PACKAGE_URL ""
| #define PACKAGE "libnl"
| #define VERSION "3.1"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define HAVE_PYTHON "2.7"
| /* end confdefs.h.  */

|               #include <Python.h>
| int
| main ()
| {
| Py_Initialize();
|   ;
|   return 0;
| }

configure:11511: result: no
configure:11515: error: in `/usr/lib/libnl-3.1':
configure:11517: error: 
  Could not link test program to Python. Maybe the main Python library has been
  installed in some non-standard library path. If so, pass it to configure,
  via the LDFLAGS environment variable.
  Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib"
<%a12danrulz> Idk, but doing a DoS from an apple device is like fighting a bear with a plastic spork

Don't like seeing ads? Click here to register!

Trcx528

  • Haxor
  • Hero Member
  • *****
  • Posts: 4502
  • Reputation: 166
  • Google it!
    • iNinjas
  • Badges:
  • Computers: 13" 2011 Macbook Pro, 120 GB SSD and 16 GB of Ram
  • iDevices: None
Re: C compiler cannot create executables
« Reply #25 on: June 29, 2012, 05:20:00 am »
get python 2.7 (vs 2.5) from cydia.radare.org and try again.  I looks like it's hardcode in there to use python 2.7 (although earlier it was checking for python > 2.3 I think)

C0deH4cker

  • Hero Member
  • *****
  • Posts: 2849
  • Reputation: 129
  • I am leaving iNinjas. Contact me via email.
  • Badges:
  • iDevices: iPhone 4S 16gb Black (5.1.1), iPad 2 32gb White (5.0.1), iPod Touch 2G 8gb (4.2.1)
Re: C compiler cannot create executables
« Reply #26 on: June 29, 2012, 05:34:24 am »
Looks like he has 2.7 already. Get 2.5 instead. Uninstall 2.7 and remove that repo. Then, install 2.5 from default repos. Then just add the source back. I know that 2.5 has the development stuff. And you were getting the makefile error because that wasnt the makefile but Makefile.am or Makefile.in and you renamed it. You must run configure first.

Apetrick

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3512
  • Reputation: 90
  • <Apetrick> lank is 1337
  • Badges:
  • iDevices: Ipod Touch 4g
Re: C compiler cannot create executables
« Reply #27 on: June 29, 2012, 05:36:37 am »
Yeh i have 2.7 and i did rename the makefile :-\ i thought they just messed.
<%a12danrulz> Idk, but doing a DoS from an apple device is like fighting a bear with a plastic spork

C0deH4cker

  • Hero Member
  • *****
  • Posts: 2849
  • Reputation: 129
  • I am leaving iNinjas. Contact me via email.
  • Badges:
  • iDevices: iPhone 4S 16gb Black (5.1.1), iPad 2 32gb White (5.0.1), iPod Touch 2G 8gb (4.2.1)
Re: C compiler cannot create executables
« Reply #28 on: June 29, 2012, 05:38:43 am »
Nope, thats intentional. The 2.7 is not a development version. You need 2.5. I ran into a similar problem and needed to downgrade my python to 2.5.

Apetrick

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3512
  • Reputation: 90
  • <Apetrick> lank is 1337
  • Badges:
  • iDevices: Ipod Touch 4g
Re: C compiler cannot create executables
« Reply #29 on: June 29, 2012, 05:47:57 am »
Needs an interpreter thats atleast 2.6
<%a12danrulz> Idk, but doing a DoS from an apple device is like fighting a bear with a plastic spork