Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #40319 > unrolled thread

How to install development package on linux?

Started bySarbjit singh <sarbjit1987@gmail.com>
First post2013-03-01 22:24 -0800
Last post2013-03-02 10:00 -0800
Articles 13 — 4 participants

Back to article view | Back to comp.lang.python


Contents

  How to install development package on linux? Sarbjit singh <sarbjit1987@gmail.com> - 2013-03-01 22:24 -0800
    Re: How to install development package on linux? Kwpolska <kwpolska@gmail.com> - 2013-03-02 09:45 +0100
      Re: How to install development package on linux? Sarbjit singh <sarbjit1987@gmail.com> - 2013-03-02 10:00 -0800
        Fwd: How to install development package on linux? Kwpolska <kwpolska@gmail.com> - 2013-03-02 20:52 +0100
          Re: How to install development package on linux? Sarbjit singh <sarbjit1987@gmail.com> - 2013-03-02 22:14 -0800
            Re: How to install development package on linux? Benjamin Kaplan <benjamin.kaplan@case.edu> - 2013-03-02 22:23 -0800
              Re: How to install development package on linux? Sarbjit singh <sarbjit1987@gmail.com> - 2013-03-02 22:39 -0800
                Re: How to install development package on linux? Sarbjit singh <sarbjit1987@gmail.com> - 2013-03-02 22:46 -0800
                Re: How to install development package on linux? Sarbjit singh <sarbjit1987@gmail.com> - 2013-03-02 22:46 -0800
                Re: How to install development package on linux? Michael Torrie <torriem@gmail.com> - 2013-03-03 09:26 -0700
              Re: How to install development package on linux? Sarbjit singh <sarbjit1987@gmail.com> - 2013-03-02 22:39 -0800
          Re: How to install development package on linux? Sarbjit singh <sarbjit1987@gmail.com> - 2013-03-02 22:14 -0800
      Re: How to install development package on linux? Sarbjit singh <sarbjit1987@gmail.com> - 2013-03-02 10:00 -0800

#40319 — How to install development package on linux?

FromSarbjit singh <sarbjit1987@gmail.com>
Date2013-03-01 22:24 -0800
SubjectHow to install development package on linux?
Message-ID<76c6aca8-50da-42d3-82e9-2d9c74785570@googlegroups.com>
Sorry for this basic question but I am having problem compiling mod_wsgi on Linux. As per mod_wsgi package site, user must have python development package installed on system.

I had installed Python2.7 on my Linux system from source code, using the following configuration few months back :-

./configure –prefix=<path> --enable-shared
Make –i install

But I am not able to find how to install development package from source code. 

Can some one please conform if I can install the development package from the same source code (Downloaded from Python Website for Unix) and please share the configuration switch for the same.

Thanks,
Sarbjit

[toc] | [next] | [standalone]


#40327

FromKwpolska <kwpolska@gmail.com>
Date2013-03-02 09:45 +0100
Message-ID<mailman.2772.1362213932.2939.python-list@python.org>
In reply to#40319
On Sat, Mar 2, 2013 at 7:24 AM, Sarbjit singh <sarbjit1987@gmail.com> wrote:
> Sorry for this basic question but I am having problem compiling mod_wsgi on Linux. As per mod_wsgi package site, user must have python development package installed on system.
>
> I had installed Python2.7 on my Linux system from source code, using the following configuration few months back :-
>
> ./configure –prefix=<path> --enable-shared
> Make –i install
>
> But I am not able to find how to install development package from source code.
>
> Can some one please conform if I can install the development package from the same source code (Downloaded from Python Website for Unix) and please share the configuration switch for the same.
>
> Thanks,
> Sarbjit
> --
> http://mail.python.org/mailman/listinfo/python-list

Why do you use source tarballs?  Your distro should provide nice
binary packages for Python and mod_wsgi.  And in case it doesn’t, your
distro sucks and you should find a better one.

The development things are usually installed by default by most
things.  Distributions offer them in -dev or -devel packages.

--
Kwpolska <http://kwpolska.tk> | GPG KEY: 5EAAEA16
stop html mail                | always bottom-post
http://asciiribbon.org        | http://caliburn.nl/topposting.html

[toc] | [prev] | [next] | [standalone]


#40350

FromSarbjit singh <sarbjit1987@gmail.com>
Date2013-03-02 10:00 -0800
Message-ID<fb42a4af-2bdf-4693-acd7-9775b23299b7@googlegroups.com>
In reply to#40327
On Saturday, March 2, 2013 2:15:08 PM UTC+5:30, Kwpolska wrote:
> On Sat, Mar 2, 2013 at 7:24 AM, Sarbjit singh <sarbjit1987@gmail.com> wrote:
> 
> > Sorry for this basic question but I am having problem compiling mod_wsgi on Linux. As per mod_wsgi package site, user must have python development package installed on system.
> 
> >
> 
> > I had installed Python2.7 on my Linux system from source code, using the following configuration few months back :-
> 
> >
> 
> > ./configure –prefix=<path> --enable-shared
> 
> > Make –i install
> 
> >
> 
> > But I am not able to find how to install development package from source code.
> 
> >
> 
> > Can some one please conform if I can install the development package from the same source code (Downloaded from Python Website for Unix) and please share the configuration switch for the same.
> 
> >
> 
> > Thanks,
> 
> > Sarbjit
> 
> > --
> 
> > http://mail.python.org/mailman/listinfo/python-list
> 
> 
> 
> Why do you use source tarballs?  Your distro should provide nice
> 
> binary packages for Python and mod_wsgi.  And in case it doesn’t, your
> 
> distro sucks and you should find a better one.
> 
> 
> 
> The development things are usually installed by default by most
> 
> things.  Distributions offer them in -dev or -devel packages.
> 
> 
> 
> --
> 
> Kwpolska <http://kwpolska.tk> | GPG KEY: 5EAAEA16
> 
> stop html mail                | always bottom-post
> 
> http://asciiribbon.org        | http://caliburn.nl/topposting.html

I am using Red Hat 5, could you please give some pointers on how to install these packages?

[toc] | [prev] | [next] | [standalone]


#40362

FromKwpolska <kwpolska@gmail.com>
Date2013-03-02 20:52 +0100
Message-ID<mailman.2794.1362253993.2939.python-list@python.org>
In reply to#40350
On Sat, Mar 2, 2013 at 7:00 PM, Sarbjit singh <sarbjit1987@gmail.com> wrote:
> On Saturday, March 2, 2013 2:15:08 PM UTC+5:30, Kwpolska wrote:
>> On Sat, Mar 2, 2013 at 7:24 AM, Sarbjit singh <sarbjit1987@gmail.com> wrote:
>>
>> > Sorry for this basic question but I am having problem compiling mod_wsgi on Linux. As per mod_wsgi package site, user must have python development package installed on system.
>>
>> >
>>
>> > I had installed Python2.7 on my Linux system from source code, using the following configuration few months back :-
>>
>> >
>>
>> > ./configure –prefix=<path> --enable-shared
>>
>> > Make –i install
>>
>> >
>>
>> > But I am not able to find how to install development package from source code.
>>
>> >
>>
>> > Can some one please conform if I can install the development package from the same source code (Downloaded from Python Website for Unix) and please share the configuration switch for the same.
>>
>> >
>>
>> > Thanks,
>>
>> > Sarbjit
>>
>> > --
>>
>> > http://mail.python.org/mailman/listinfo/python-list
>>
>>
>>
>> Why do you use source tarballs?  Your distro should provide nice
>>
>> binary packages for Python and mod_wsgi.  And in case it doesn’t, your
>>
>> distro sucks and you should find a better one.
>>
>>
>>
>> The development things are usually installed by default by most
>>
>> things.  Distributions offer them in -dev or -devel packages.
>>
>>
>>
>> --
>>
>> Kwpolska <http://kwpolska.tk> | GPG KEY: 5EAAEA16
>>
>> stop html mail                | always bottom-post
>>
>> http://asciiribbon.org        | http://caliburn.nl/topposting.html
>
> I am using Red Hat 5, could you please give some pointers on how to install these packages?
> --
> http://mail.python.org/mailman/listinfo/python-list

Impossible, unless you:
(a) build such packages yourself (Fedora .spec files may help you); or
(b) upgrade to RHEL 6, which offers packages for python 2.6 and mod_wsgi; or
(c) look for such packages on the Internet (you probably won’t find any).

So, get back to compiling from source.  Have you actually tried
building those packages before asking?  Because, according to the Arch
Linux PKGBUILDs for python2 and mod_wsgi2, it doesn’t have any
specific switches to enable anything “devel-related” (also, Arch Linux
doesn’t bother with the dumb -dev(el) packages, which make no sense in
real life).

-- 
Kwpolska <http://kwpolska.tk> | GPG KEY: 5EAAEA16
stop html mail                | always bottom-post
http://asciiribbon.org        | http://caliburn.nl/topposting.html

[toc] | [prev] | [next] | [standalone]


#40399

FromSarbjit singh <sarbjit1987@gmail.com>
Date2013-03-02 22:14 -0800
Message-ID<e8644fe1-416a-4d55-8a9d-2933949a3786@googlegroups.com>
In reply to#40362
On Sunday, March 3, 2013 1:22:50 AM UTC+5:30, Kwpolska wrote:
> On Sat, Mar 2, 2013 at 7:00 PM, Sarbjit singh <sarbjit1987@gmail.com> wrote:
> 
> > On Saturday, March 2, 2013 2:15:08 PM UTC+5:30, Kwpolska wrote:
> 
> >> On Sat, Mar 2, 2013 at 7:24 AM, Sarbjit singh <sarbjit1987@gmail.com> wrote:
> 
> >>
> 
> >> > Sorry for this basic question but I am having problem compiling mod_wsgi on Linux. As per mod_wsgi package site, user must have python development package installed on system.
> 
> >>
> 
> >> >
> 
> >>
> 
> >> > I had installed Python2.7 on my Linux system from source code, using the following configuration few months back :-
> 
> >>
> 
> >> >
> 
> >>
> 
> >> > ./configure –prefix=<path> --enable-shared
> 
> >>
> 
> >> > Make –i install
> 
> >>
> 
> >> >
> 
> >>
> 
> >> > But I am not able to find how to install development package from source code.
> 
> >>
> 
> >> >
> 
> >>
> 
> >> > Can some one please conform if I can install the development package from the same source code (Downloaded from Python Website for Unix) and please share the configuration switch for the same.
> 
> >>
> 
> >> >
> 
> >>
> 
> >> > Thanks,
> 
> >>
> 
> >> > Sarbjit
> 
> >>
> 
> >> > --
> 
> >>
> 
> >> > http://mail.python.org/mailman/listinfo/python-list
> 
> >>
> 
> >>
> 
> >>
> 
> >> Why do you use source tarballs?  Your distro should provide nice
> 
> >>
> 
> >> binary packages for Python and mod_wsgi.  And in case it doesn’t, your
> 
> >>
> 
> >> distro sucks and you should find a better one.
> 
> >>
> 
> >>
> 
> >>
> 
> >> The development things are usually installed by default by most
> 
> >>
> 
> >> things.  Distributions offer them in -dev or -devel packages.
> 
> >>
> 
> >>
> 
> >>
> 
> >> --
> 
> >>
> 
> >> Kwpolska <http://kwpolska.tk> | GPG KEY: 5EAAEA16
> 
> >>
> 
> >> stop html mail                | always bottom-post
> 
> >>
> 
> >> http://asciiribbon.org        | http://caliburn.nl/topposting.html
> 
> >
> 
> > I am using Red Hat 5, could you please give some pointers on how to install these packages?
> 
> > --
> 
> > http://mail.python.org/mailman/listinfo/python-list
> 
> 
> 
> Impossible, unless you:
> 
> (a) build such packages yourself (Fedora .spec files may help you); or
> 
> (b) upgrade to RHEL 6, which offers packages for python 2.6 and mod_wsgi; or
> 
> (c) look for such packages on the Internet (you probably won’t find any).
> 
> 
> 
> So, get back to compiling from source.  Have you actually tried
> 
> building those packages before asking?  Because, according to the Arch
> 
> Linux PKGBUILDs for python2 and mod_wsgi2, it doesn’t have any
> 
> specific switches to enable anything “devel-related” (also, Arch Linux
> 
> doesn’t bother with the dumb -dev(el) packages, which make no sense in
> 
> real life).
> 
> 
> 
> -- 
> 
> Kwpolska <http://kwpolska.tk> | GPG KEY: 5EAAEA16
> 
> stop html mail                | always bottom-post
> 
> http://asciiribbon.org        | http://caliburn.nl/topposting.html

Its not possible for me to switch to Red Hat6 at the moment. 

Yes, I did tried compiling these from the source code and got some errors. I am using Xaamp for linux and following the below link for configuring python/mod_wsgi :-

 http://www.apachefriends.org/f/viewtopic.php?f=17&t=42975

When I initially tried to compile mod_wsgi, I was getting errors which got resolved by using development package fro Xammp for linux. (Solution found on google) 

Now I am getting the following compiling errors:-

#########################################################
mod_wsgi.c:14967: error: expected expression before ')' token
mod_wsgi.c:14974: error: expected ';' before 'do'
mod_wsgi.c:14979: error: expected ';' before '}' token
mod_wsgi.c:14984: error: too many arguments to function 'wsgi_log_python_error'
mod_wsgi.c:14989: error: expected expression before 'module'
mod_wsgi.c: In function 'wsgi_allow_access':
mod_wsgi.c:15003: error: 'PyObject' undeclared (first use in this function)
mod_wsgi.c:15003: error: 'modules' undeclared (first use in this function)
mod_wsgi.c:15004: error: expected expression before 'module'
mod_wsgi.c:15051: error: 'Py_BEGIN_ALLOW_THREADS' undeclared (first use in this function)
mod_wsgi.c:15052: error: expected ';' before 'apr_thread_mutex_lock'
mod_wsgi.c:15053: error: 'Py_END_ALLOW_THREADS' undeclared (first use in this function)
mod_wsgi.c:15056: error: expected ';' before 'modules'
mod_wsgi.c:15057: error: expected identifier or '(' before '=' token
mod_wsgi.c:15059: error: expected expression before 'module'
mod_wsgi.c:15061: error: expected expression before 'module'
mod_wsgi.c:15070: error: expected expression before 'module'
mod_wsgi.c:15071: error: expected expression before 'module'
mod_wsgi.c:15082: error: expected expression before 'module'
mod_wsgi.c:15083: error: expected identifier or '(' before '=' token
mod_wsgi.c:15089: error: expected expression before 'module'
mod_wsgi.c:15090: error: expected identifier or '(' before '=' token
mod_wsgi.c:15105: error: expected expression before 'module'
mod_wsgi.c:15106: error: 'module_dict' undeclared (first use in this function)
mod_wsgi.c:15107: error: 'object' undeclared (first use in this function)
mod_wsgi.c:15109: error: expected expression before 'module'
mod_wsgi.c:15113: error: 'vars' undeclared (first use in this function)
mod_wsgi.c:15114: error: 'args' undeclared (first use in this function)
mod_wsgi.c:15115: error: 'flag' undeclared (first use in this function)
mod_wsgi.c:15116: error: 'method' undeclared (first use in this function)
mod_wsgi.c:15133: error: 'Py_None' undeclared (first use in this function)
mod_wsgi.c:15136: warning: implicit declaration of function 'PyBool_Check'
mod_wsgi.c:15137: error: 'Py_True' undeclared (first use in this function)
mod_wsgi.c:15142: error: expected ';' before 'do'
mod_wsgi.c:15148: error: expected ';' before '}' token
mod_wsgi.c:15161: error: 'AuthObject' has no member named 'r'
mod_wsgi.c:15165: error: 'AuthObject' has no member named 'log'
mod_wsgi.c:15168: error: 'PyExc_AttributeError' undeclared (first use in this function)
mod_wsgi.c:15170: error: 'AuthObject' has no member named 'log'
mod_wsgi.c:15183: error: expected expression before ')' token
mod_wsgi.c:15190: error: expected ';' before 'do'
mod_wsgi.c:15195: error: expected ';' before '}' token
mod_wsgi.c:15200: error: too many arguments to function 'wsgi_log_python_error'
mod_wsgi.c:15205: error: expected expression before 'module'
mod_wsgi.c: In function 'wsgi_hook_check_user_id':
mod_wsgi.c:15260: error: 'PyObject' undeclared (first use in this function)
mod_wsgi.c:15260: error: 'modules' undeclared (first use in this function)
mod_wsgi.c:15261: error: expected expression before 'module'
mod_wsgi.c:15306: error: 'Py_BEGIN_ALLOW_THREADS' undeclared (first use in this function)
mod_wsgi.c:15307: error: expected ';' before 'apr_thread_mutex_lock'
mod_wsgi.c:15308: error: 'Py_END_ALLOW_THREADS' undeclared (first use in this function)
mod_wsgi.c:15311: error: expected ';' before 'modules'
mod_wsgi.c:15312: error: expected identifier or '(' before '=' token
mod_wsgi.c:15314: error: expected expression before 'module'
mod_wsgi.c:15316: error: expected expression before 'module'
mod_wsgi.c:15325: error: expected expression before 'module'
mod_wsgi.c:15326: error: expected expression before 'module'
mod_wsgi.c:15337: error: expected expression before 'module'
mod_wsgi.c:15338: error: expected identifier or '(' before '=' token
mod_wsgi.c:15344: error: expected expression before 'module'
mod_wsgi.c:15345: error: expected identifier or '(' before '=' token
mod_wsgi.c:15360: error: expected expression before 'module'
mod_wsgi.c:15361: error: 'module_dict' undeclared (first use in this function)
mod_wsgi.c:15362: error: 'object' undeclared (first use in this function)
mod_wsgi.c:15364: error: expected expression before 'module'
mod_wsgi.c:15368: error: 'vars' undeclared (first use in this function)
mod_wsgi.c:15369: error: 'args' undeclared (first use in this function)
mod_wsgi.c:15370: error: 'result' undeclared (first use in this function)
mod_wsgi.c:15371: error: 'method' undeclared (first use in this function)
mod_wsgi.c:15388: error: 'Py_None' undeclared (first use in this function)
mod_wsgi.c:15402: error: 'Py_True' undeclared (first use in this function)
mod_wsgi.c:15405: error: 'Py_False' undeclared (first use in this function)
mod_wsgi.c:15417: error: 'PyExc_TypeError' undeclared (first use in this function)
mod_wsgi.c:15433: error: 'AuthObject' has no member named 'r'
mod_wsgi.c:15437: error: 'AuthObject' has no member named 'log'
mod_wsgi.c:15440: error: 'PyExc_AttributeError' undeclared (first use in this function)
mod_wsgi.c:15442: error: 'AuthObject' has no member named 'log'
mod_wsgi.c:15455: error: expected expression before ')' token
mod_wsgi.c:15462: error: expected ';' before 'do'
mod_wsgi.c:15467: error: expected ';' before '}' token
mod_wsgi.c:15472: error: too many arguments to function 'wsgi_log_python_error'
mod_wsgi.c:15477: error: expected expression before 'module'
apxs:Error: Command failed with rc=65536
.
make: *** [mod_wsgi.la] Error 1
#########################################################

I searched on google and found these errors could be due to missing python header files which would be available in development package.

So I am struggling to make it work.

Thanks,
Sarbjit

[toc] | [prev] | [next] | [standalone]


#40401

FromBenjamin Kaplan <benjamin.kaplan@case.edu>
Date2013-03-02 22:23 -0800
Message-ID<mailman.2816.1362291841.2939.python-list@python.org>
In reply to#40399
On Sat, Mar 2, 2013 at 10:14 PM, Sarbjit singh <sarbjit1987@gmail.com> wrote:
>
> I searched on google and found these errors could be due to missing python header files which would be available in development package.
>
> So I am struggling to make it work.


A "development package" is meaningless when you aren't installing it
from a package. Debian's binary packages don't include the header
files, so they put them in a different package. Since you compiled
from source, you already have the header files. Did you include the
directory you installed Python into on your library and includes
paths?

[toc] | [prev] | [next] | [standalone]


#40403

FromSarbjit singh <sarbjit1987@gmail.com>
Date2013-03-02 22:39 -0800
Message-ID<a53cf34a-f857-49f6-b323-18ddf1f246f1@googlegroups.com>
In reply to#40401
On Sunday, March 3, 2013 11:53:50 AM UTC+5:30, Benjamin Kaplan wrote:
> On Sat, Mar 2, 2013 at 10:14 PM, Sarbjit singh <sarbjit1987@gmail.com> wrote:
> 
> >
> 
> > I searched on google and found these errors could be due to missing python header files which would be available in development package.
> 
> >
> 
> > So I am struggling to make it work.
> 
> 
> 
> 
> 
> A "development package" is meaningless when you aren't installing it
> 
> from a package. Debian's binary packages don't include the header
> 
> files, so they put them in a different package. Since you compiled
> 
> from source, you already have the header files. Did you include the
> 
> directory you installed Python into on your library and includes
> 
> paths?

Yes, I configured the makefile for mod_wsgi as without any error :

 ./configure --prefix=/opt/lampp/ --with-apxs=/opt/lampp/bin/apxs --with-python=/opt/lampp/python/bin/python2.7 --with-mutex-dir=/opt/lampp/var/run/wsgi

[toc] | [prev] | [next] | [standalone]


#40404

FromSarbjit singh <sarbjit1987@gmail.com>
Date2013-03-02 22:46 -0800
Message-ID<6aa5366c-0292-46fc-afc0-057aba810276@googlegroups.com>
In reply to#40403
On Sunday, March 3, 2013 12:09:46 PM UTC+5:30, Sarbjit singh wrote:
> On Sunday, March 3, 2013 11:53:50 AM UTC+5:30, Benjamin Kaplan wrote:
> 
> > On Sat, Mar 2, 2013 at 10:14 PM, Sarbjit singh <sarbjit1987@gmail.com> wrote:
> 
> > 
> 
> > >
> 
> > 
> 
> > > I searched on google and found these errors could be due to missing python header files which would be available in development package.
> 
> > 
> 
> > >
> 
> > 
> 
> > > So I am struggling to make it work.
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > A "development package" is meaningless when you aren't installing it
> 
> > 
> 
> > from a package. Debian's binary packages don't include the header
> 
> > 
> 
> > files, so they put them in a different package. Since you compiled
> 
> > 
> 
> > from source, you already have the header files. Did you include the
> 
> > 
> 
> > directory you installed Python into on your library and includes
> 
> > 
> 
> > paths?
> 
> 
> 
> Yes, I configured the makefile for mod_wsgi as without any error :
> 
> 
> 
>  ./configure --prefix=/opt/lampp/ --with-apxs=/opt/lampp/bin/apxs --with-python=/opt/lampp/python/bin/python2.7 --with-mutex-dir=/opt/lampp/var/run/wsgi

Also my LD_LIBRARY_PATH does have path as :

/opt/lammp/python/lib

Just one more point, while initially I was trying to compiling the mod_wsgi, I was getting error for "libpython2.7.1.0.so Shared library error".

I resolved it by creating a soft link to this file in my /usr/lib and /usr/lib64. At that point also my LD_LIBRARY_PATH was having path for python lib but was resolved with soft link only.

[toc] | [prev] | [next] | [standalone]


#40405

FromSarbjit singh <sarbjit1987@gmail.com>
Date2013-03-02 22:46 -0800
Message-ID<mailman.2818.1362293190.2939.python-list@python.org>
In reply to#40403
On Sunday, March 3, 2013 12:09:46 PM UTC+5:30, Sarbjit singh wrote:
> On Sunday, March 3, 2013 11:53:50 AM UTC+5:30, Benjamin Kaplan wrote:
> 
> > On Sat, Mar 2, 2013 at 10:14 PM, Sarbjit singh <sarbjit1987@gmail.com> wrote:
> 
> > 
> 
> > >
> 
> > 
> 
> > > I searched on google and found these errors could be due to missing python header files which would be available in development package.
> 
> > 
> 
> > >
> 
> > 
> 
> > > So I am struggling to make it work.
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > A "development package" is meaningless when you aren't installing it
> 
> > 
> 
> > from a package. Debian's binary packages don't include the header
> 
> > 
> 
> > files, so they put them in a different package. Since you compiled
> 
> > 
> 
> > from source, you already have the header files. Did you include the
> 
> > 
> 
> > directory you installed Python into on your library and includes
> 
> > 
> 
> > paths?
> 
> 
> 
> Yes, I configured the makefile for mod_wsgi as without any error :
> 
> 
> 
>  ./configure --prefix=/opt/lampp/ --with-apxs=/opt/lampp/bin/apxs --with-python=/opt/lampp/python/bin/python2.7 --with-mutex-dir=/opt/lampp/var/run/wsgi

Also my LD_LIBRARY_PATH does have path as :

/opt/lammp/python/lib

Just one more point, while initially I was trying to compiling the mod_wsgi, I was getting error for "libpython2.7.1.0.so Shared library error".

I resolved it by creating a soft link to this file in my /usr/lib and /usr/lib64. At that point also my LD_LIBRARY_PATH was having path for python lib but was resolved with soft link only.

[toc] | [prev] | [next] | [standalone]


#40414

FromMichael Torrie <torriem@gmail.com>
Date2013-03-03 09:26 -0700
Message-ID<mailman.2822.1362328007.2939.python-list@python.org>
In reply to#40403
On 03/02/2013 11:39 PM, Sarbjit singh wrote:
> Yes, I configured the makefile for mod_wsgi as without any error :
>  ./configure --prefix=/opt/lampp/ --with-apxs=/opt/lampp/bin/apxs --with-python=/opt/lampp/python/bin/python2.7 --with-mutex-dir=/opt/lampp/var/run/wsgi

This is not quite right.  the --with-python option should point to the
python install path, not the python binary itself.  It probably should be:

--with-python=/opt/lampp/python

Presuming that's what you used as a prefix when you built and installed
python 2.7.

When installing from source code, there's no such thing as a
"development package."  Tarballs nominally install binaries, libraries,
and header files, which is the equivalent of a Red Hat rpm plus the
devel rpm.  In other words when you did a "make install" everything you
need to compile against python 2.7 is installed to the prefix you used.

[toc] | [prev] | [next] | [standalone]


#40407

FromSarbjit singh <sarbjit1987@gmail.com>
Date2013-03-02 22:39 -0800
Message-ID<mailman.2820.1362293505.2939.python-list@python.org>
In reply to#40401
On Sunday, March 3, 2013 11:53:50 AM UTC+5:30, Benjamin Kaplan wrote:
> On Sat, Mar 2, 2013 at 10:14 PM, Sarbjit singh <sarbjit1987@gmail.com> wrote:
> 
> >
> 
> > I searched on google and found these errors could be due to missing python header files which would be available in development package.
> 
> >
> 
> > So I am struggling to make it work.
> 
> 
> 
> 
> 
> A "development package" is meaningless when you aren't installing it
> 
> from a package. Debian's binary packages don't include the header
> 
> files, so they put them in a different package. Since you compiled
> 
> from source, you already have the header files. Did you include the
> 
> directory you installed Python into on your library and includes
> 
> paths?

Yes, I configured the makefile for mod_wsgi as without any error :

 ./configure --prefix=/opt/lampp/ --with-apxs=/opt/lampp/bin/apxs --with-python=/opt/lampp/python/bin/python2.7 --with-mutex-dir=/opt/lampp/var/run/wsgi

[toc] | [prev] | [next] | [standalone]


#40400

FromSarbjit singh <sarbjit1987@gmail.com>
Date2013-03-02 22:14 -0800
Message-ID<mailman.2815.1362291722.2939.python-list@python.org>
In reply to#40362
On Sunday, March 3, 2013 1:22:50 AM UTC+5:30, Kwpolska wrote:
> On Sat, Mar 2, 2013 at 7:00 PM, Sarbjit singh <sarbjit1987@gmail.com> wrote:
> 
> > On Saturday, March 2, 2013 2:15:08 PM UTC+5:30, Kwpolska wrote:
> 
> >> On Sat, Mar 2, 2013 at 7:24 AM, Sarbjit singh <sarbjit1987@gmail.com> wrote:
> 
> >>
> 
> >> > Sorry for this basic question but I am having problem compiling mod_wsgi on Linux. As per mod_wsgi package site, user must have python development package installed on system.
> 
> >>
> 
> >> >
> 
> >>
> 
> >> > I had installed Python2.7 on my Linux system from source code, using the following configuration few months back :-
> 
> >>
> 
> >> >
> 
> >>
> 
> >> > ./configure –prefix=<path> --enable-shared
> 
> >>
> 
> >> > Make –i install
> 
> >>
> 
> >> >
> 
> >>
> 
> >> > But I am not able to find how to install development package from source code.
> 
> >>
> 
> >> >
> 
> >>
> 
> >> > Can some one please conform if I can install the development package from the same source code (Downloaded from Python Website for Unix) and please share the configuration switch for the same.
> 
> >>
> 
> >> >
> 
> >>
> 
> >> > Thanks,
> 
> >>
> 
> >> > Sarbjit
> 
> >>
> 
> >> > --
> 
> >>
> 
> >> > http://mail.python.org/mailman/listinfo/python-list
> 
> >>
> 
> >>
> 
> >>
> 
> >> Why do you use source tarballs?  Your distro should provide nice
> 
> >>
> 
> >> binary packages for Python and mod_wsgi.  And in case it doesn’t, your
> 
> >>
> 
> >> distro sucks and you should find a better one.
> 
> >>
> 
> >>
> 
> >>
> 
> >> The development things are usually installed by default by most
> 
> >>
> 
> >> things.  Distributions offer them in -dev or -devel packages.
> 
> >>
> 
> >>
> 
> >>
> 
> >> --
> 
> >>
> 
> >> Kwpolska <http://kwpolska.tk> | GPG KEY: 5EAAEA16
> 
> >>
> 
> >> stop html mail                | always bottom-post
> 
> >>
> 
> >> http://asciiribbon.org        | http://caliburn.nl/topposting.html
> 
> >
> 
> > I am using Red Hat 5, could you please give some pointers on how to install these packages?
> 
> > --
> 
> > http://mail.python.org/mailman/listinfo/python-list
> 
> 
> 
> Impossible, unless you:
> 
> (a) build such packages yourself (Fedora .spec files may help you); or
> 
> (b) upgrade to RHEL 6, which offers packages for python 2.6 and mod_wsgi; or
> 
> (c) look for such packages on the Internet (you probably won’t find any).
> 
> 
> 
> So, get back to compiling from source.  Have you actually tried
> 
> building those packages before asking?  Because, according to the Arch
> 
> Linux PKGBUILDs for python2 and mod_wsgi2, it doesn’t have any
> 
> specific switches to enable anything “devel-related” (also, Arch Linux
> 
> doesn’t bother with the dumb -dev(el) packages, which make no sense in
> 
> real life).
> 
> 
> 
> -- 
> 
> Kwpolska <http://kwpolska.tk> | GPG KEY: 5EAAEA16
> 
> stop html mail                | always bottom-post
> 
> http://asciiribbon.org        | http://caliburn.nl/topposting.html

Its not possible for me to switch to Red Hat6 at the moment. 

Yes, I did tried compiling these from the source code and got some errors. I am using Xaamp for linux and following the below link for configuring python/mod_wsgi :-

 http://www.apachefriends.org/f/viewtopic.php?f=17&t=42975

When I initially tried to compile mod_wsgi, I was getting errors which got resolved by using development package fro Xammp for linux. (Solution found on google) 

Now I am getting the following compiling errors:-

#########################################################
mod_wsgi.c:14967: error: expected expression before ')' token
mod_wsgi.c:14974: error: expected ';' before 'do'
mod_wsgi.c:14979: error: expected ';' before '}' token
mod_wsgi.c:14984: error: too many arguments to function 'wsgi_log_python_error'
mod_wsgi.c:14989: error: expected expression before 'module'
mod_wsgi.c: In function 'wsgi_allow_access':
mod_wsgi.c:15003: error: 'PyObject' undeclared (first use in this function)
mod_wsgi.c:15003: error: 'modules' undeclared (first use in this function)
mod_wsgi.c:15004: error: expected expression before 'module'
mod_wsgi.c:15051: error: 'Py_BEGIN_ALLOW_THREADS' undeclared (first use in this function)
mod_wsgi.c:15052: error: expected ';' before 'apr_thread_mutex_lock'
mod_wsgi.c:15053: error: 'Py_END_ALLOW_THREADS' undeclared (first use in this function)
mod_wsgi.c:15056: error: expected ';' before 'modules'
mod_wsgi.c:15057: error: expected identifier or '(' before '=' token
mod_wsgi.c:15059: error: expected expression before 'module'
mod_wsgi.c:15061: error: expected expression before 'module'
mod_wsgi.c:15070: error: expected expression before 'module'
mod_wsgi.c:15071: error: expected expression before 'module'
mod_wsgi.c:15082: error: expected expression before 'module'
mod_wsgi.c:15083: error: expected identifier or '(' before '=' token
mod_wsgi.c:15089: error: expected expression before 'module'
mod_wsgi.c:15090: error: expected identifier or '(' before '=' token
mod_wsgi.c:15105: error: expected expression before 'module'
mod_wsgi.c:15106: error: 'module_dict' undeclared (first use in this function)
mod_wsgi.c:15107: error: 'object' undeclared (first use in this function)
mod_wsgi.c:15109: error: expected expression before 'module'
mod_wsgi.c:15113: error: 'vars' undeclared (first use in this function)
mod_wsgi.c:15114: error: 'args' undeclared (first use in this function)
mod_wsgi.c:15115: error: 'flag' undeclared (first use in this function)
mod_wsgi.c:15116: error: 'method' undeclared (first use in this function)
mod_wsgi.c:15133: error: 'Py_None' undeclared (first use in this function)
mod_wsgi.c:15136: warning: implicit declaration of function 'PyBool_Check'
mod_wsgi.c:15137: error: 'Py_True' undeclared (first use in this function)
mod_wsgi.c:15142: error: expected ';' before 'do'
mod_wsgi.c:15148: error: expected ';' before '}' token
mod_wsgi.c:15161: error: 'AuthObject' has no member named 'r'
mod_wsgi.c:15165: error: 'AuthObject' has no member named 'log'
mod_wsgi.c:15168: error: 'PyExc_AttributeError' undeclared (first use in this function)
mod_wsgi.c:15170: error: 'AuthObject' has no member named 'log'
mod_wsgi.c:15183: error: expected expression before ')' token
mod_wsgi.c:15190: error: expected ';' before 'do'
mod_wsgi.c:15195: error: expected ';' before '}' token
mod_wsgi.c:15200: error: too many arguments to function 'wsgi_log_python_error'
mod_wsgi.c:15205: error: expected expression before 'module'
mod_wsgi.c: In function 'wsgi_hook_check_user_id':
mod_wsgi.c:15260: error: 'PyObject' undeclared (first use in this function)
mod_wsgi.c:15260: error: 'modules' undeclared (first use in this function)
mod_wsgi.c:15261: error: expected expression before 'module'
mod_wsgi.c:15306: error: 'Py_BEGIN_ALLOW_THREADS' undeclared (first use in this function)
mod_wsgi.c:15307: error: expected ';' before 'apr_thread_mutex_lock'
mod_wsgi.c:15308: error: 'Py_END_ALLOW_THREADS' undeclared (first use in this function)
mod_wsgi.c:15311: error: expected ';' before 'modules'
mod_wsgi.c:15312: error: expected identifier or '(' before '=' token
mod_wsgi.c:15314: error: expected expression before 'module'
mod_wsgi.c:15316: error: expected expression before 'module'
mod_wsgi.c:15325: error: expected expression before 'module'
mod_wsgi.c:15326: error: expected expression before 'module'
mod_wsgi.c:15337: error: expected expression before 'module'
mod_wsgi.c:15338: error: expected identifier or '(' before '=' token
mod_wsgi.c:15344: error: expected expression before 'module'
mod_wsgi.c:15345: error: expected identifier or '(' before '=' token
mod_wsgi.c:15360: error: expected expression before 'module'
mod_wsgi.c:15361: error: 'module_dict' undeclared (first use in this function)
mod_wsgi.c:15362: error: 'object' undeclared (first use in this function)
mod_wsgi.c:15364: error: expected expression before 'module'
mod_wsgi.c:15368: error: 'vars' undeclared (first use in this function)
mod_wsgi.c:15369: error: 'args' undeclared (first use in this function)
mod_wsgi.c:15370: error: 'result' undeclared (first use in this function)
mod_wsgi.c:15371: error: 'method' undeclared (first use in this function)
mod_wsgi.c:15388: error: 'Py_None' undeclared (first use in this function)
mod_wsgi.c:15402: error: 'Py_True' undeclared (first use in this function)
mod_wsgi.c:15405: error: 'Py_False' undeclared (first use in this function)
mod_wsgi.c:15417: error: 'PyExc_TypeError' undeclared (first use in this function)
mod_wsgi.c:15433: error: 'AuthObject' has no member named 'r'
mod_wsgi.c:15437: error: 'AuthObject' has no member named 'log'
mod_wsgi.c:15440: error: 'PyExc_AttributeError' undeclared (first use in this function)
mod_wsgi.c:15442: error: 'AuthObject' has no member named 'log'
mod_wsgi.c:15455: error: expected expression before ')' token
mod_wsgi.c:15462: error: expected ';' before 'do'
mod_wsgi.c:15467: error: expected ';' before '}' token
mod_wsgi.c:15472: error: too many arguments to function 'wsgi_log_python_error'
mod_wsgi.c:15477: error: expected expression before 'module'
apxs:Error: Command failed with rc=65536
.
make: *** [mod_wsgi.la] Error 1
#########################################################

I searched on google and found these errors could be due to missing python header files which would be available in development package.

So I am struggling to make it work.

Thanks,
Sarbjit

[toc] | [prev] | [next] | [standalone]


#40351

FromSarbjit singh <sarbjit1987@gmail.com>
Date2013-03-02 10:00 -0800
Message-ID<mailman.2787.1362247262.2939.python-list@python.org>
In reply to#40327
On Saturday, March 2, 2013 2:15:08 PM UTC+5:30, Kwpolska wrote:
> On Sat, Mar 2, 2013 at 7:24 AM, Sarbjit singh <sarbjit1987@gmail.com> wrote:
> 
> > Sorry for this basic question but I am having problem compiling mod_wsgi on Linux. As per mod_wsgi package site, user must have python development package installed on system.
> 
> >
> 
> > I had installed Python2.7 on my Linux system from source code, using the following configuration few months back :-
> 
> >
> 
> > ./configure –prefix=<path> --enable-shared
> 
> > Make –i install
> 
> >
> 
> > But I am not able to find how to install development package from source code.
> 
> >
> 
> > Can some one please conform if I can install the development package from the same source code (Downloaded from Python Website for Unix) and please share the configuration switch for the same.
> 
> >
> 
> > Thanks,
> 
> > Sarbjit
> 
> > --
> 
> > http://mail.python.org/mailman/listinfo/python-list
> 
> 
> 
> Why do you use source tarballs?  Your distro should provide nice
> 
> binary packages for Python and mod_wsgi.  And in case it doesn’t, your
> 
> distro sucks and you should find a better one.
> 
> 
> 
> The development things are usually installed by default by most
> 
> things.  Distributions offer them in -dev or -devel packages.
> 
> 
> 
> --
> 
> Kwpolska <http://kwpolska.tk> | GPG KEY: 5EAAEA16
> 
> stop html mail                | always bottom-post
> 
> http://asciiribbon.org        | http://caliburn.nl/topposting.html

I am using Red Hat 5, could you please give some pointers on how to install these packages?

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web