python / cpython

The Python programming language
https://www.python.org
Other
62.75k stars 30.07k forks source link

Missing BuildRequires in src rpm specfile #39626

Closed 4b7a4d70-caa0-46e2-8851-9e96885a232a closed 20 years ago

4b7a4d70-caa0-46e2-8851-9e96885a232a commented 20 years ago
BPO 851020
Nosy @loewis, @akuchling

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields: ```python assignee = None closed_at = created_at = labels = ['build'] title = 'Missing BuildRequires in src rpm specfile' updated_at = user = 'https://bugs.python.org/msoulier' ``` bugs.python.org fields: ```python activity = actor = 'akuchling' assignee = 'none' closed = True closed_date = None closer = None components = ['Build'] creation = creator = 'msoulier' dependencies = [] files = [] hgrepos = [] issue_num = 851020 keywords = [] message_count = 13.0 messages = ['19183', '19184', '19185', '19186', '19187', '19188', '19189', '19190', '19191', '19192', '19193', '19194', '19195'] nosy_count = 6.0 nosy_names = ['nobody', 'loewis', 'akuchling', 'anthonybaxter', 'jafo', 'msoulier'] pr_nums = [] priority = 'normal' resolution = 'fixed' stage = None status = 'closed' superseder = None type = None url = 'https://bugs.python.org/issue851020' versions = ['Python 2.3'] ```

4b7a4d70-caa0-46e2-8851-9e96885a232a commented 20 years ago

I'm trying to build Python 2.3.2 on Fedora Core 1. The configure runs without errors, but I then get an odd error about pyconfig.h during the build.

gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -I./Include -DPy_BUILD_CORE -o Objects/dictobject.o Objects/dictobject.c In file included from Objects/dictobject.c:10: Include/Python.h:8:22: pyconfig.h: No such file or directory Include/Python.h:21:2: #error "limits.h is required by std C -- why isn't HAVE_LIMITS_H defined?" In file included from Include/Python.h:48, from Objects/dictobject.c:10: Include/pyport.h:4:48: pyconfig.h: No such file or directory Include/pyport.h:536:2: #error "could not set LONG_MAX in pyport.h" Objects/dictobject.c: In function dictresize': [Objects/dictobject.c:477](https://github.com/python/cpython/blob/main/Objects/dictobject.c#L477): warning: implicit declaration of functionfree' make: *** [Objects/dictobject.o] Error 1 [msoulier@tigger Python-2.3.2]$ find . -name pyconfig.h ./Mac/Include/pyconfig.h ./PC/pyconfig.h ./PC/os2emx/pyconfig.h ./PC/os2vacpp/pyconfig.h ./RISCOS/pyconfig.h ./pyconfig.h

I'm not sure what the issue is here.

61337411-43fc-4a9c-b8d5-4060aede66d0 commented 20 years ago

Logged In: YES user_id=21627

Can you pleas invoke the gcc command line manually, passing -v to gcc? This looks like a bug in the gcc installation: If -I. is given, it should find ./pyconfig.h.

4b7a4d70-caa0-46e2-8851-9e96885a232a commented 20 years ago

Logged In: YES user_id=470843

Well, this is quite odd, but I rebuilt and the error didn't happen this time. I'm not sure why.

However, I'm having a problem getting Tkinter built. I'm trying to port the src rpm currently, but when I do the --rebuild, I get this in post-processing.

RPM build errors: File not found by glob: /var/tmp/python2.3-2.3.2-root/usr/lib/python2.3/lib-dynload/_tkinter.so*

Looks like it was never built.

[msoulier@tigger msoulier]$ cd rpms [msoulier@tigger rpms]$ cd BUILD/ [msoulier@tigger BUILD]$ ls Python-2.3.2 [msoulier@tigger BUILD]$ find Python-2.3.2/ -name "_tkinter*" Python-2.3.2/Modules/_tkinter.c Python-2.3.2/PC/os2vacpp/_tkinter.def Python-2.3.2/PCbuild/_tkinter.dsp

I logged the entire build, if you'd like me to attach it.

[msoulier@tigger msoulier]$ rpm -q tk-devel tk-devel-8.3.5-93

Thanks.

61337411-43fc-4a9c-b8d5-4060aede66d0 commented 20 years ago

Logged In: YES user_id=21627

It would be good if you could add print statements to setup.py:detect_tkinter, to find out why it gives up.

Alternatively, you can edit Modules/Setup to force _tkinter being built.

1a90d5ba-e091-4ed6-a644-41c5568983da commented 20 years ago

Logged In: YES user_id=29957

Note that I build the 23-maint and HEAD on FC1 frequently, and haven't had any problems like this at all.

Make sure you have the tcl-devel and tk-devel RPMs installed.

4b7a4d70-caa0-46e2-8851-9e96885a232a commented 20 years ago

Logged In: YES user_id=470843

Make sure you have the tcl-devel and tk-devel RPMs installed.

I did not have tcl-devel installed. I'll try again now.

Note that if tk-devel and tcl-devel are required to build this src rpm, then they should be listed in the BuildRequires section of the specfile.

Building now...

4b7a4d70-caa0-46e2-8851-9e96885a232a commented 20 years ago

Logged In: YES user_id=470843

Building now...

It worked! Cool.

Changing Summary:

Was: building on Fedora Core 1 Is: Missing BuildRequires in src rpm specfile

61337411-43fc-4a9c-b8d5-4060aede66d0 commented 20 years ago

Logged In: YES user_id=21627

Can you contribute a patch for the spec files (in Misc/RPM)?

3772858d-27d8-44b0-a664-d68674859f36 commented 20 years ago

Logged In: NO

I'm attaching a patch and a patched version of the spec-file which adds the tcl and tk prerequesites for building if tkinter is enabled. I'm running into a problem when building with these on Fedora, but I'm not sure if it's an environment problem or a .spec problem. I'd appreciate feedback on wether this spec file works for anyone.

Sean

eacf80b2-9081-4882-a7f5-27e9644c3853 commented 20 years ago

Logged In: YES user_id=81797

Ugh, sorry, I wasn't logged in. The last message was from me.

Sean

eacf80b2-9081-4882-a7f5-27e9644c3853 commented 20 years ago

Logged In: YES user_id=81797

I guess I can't attach files to this bug. I've uploaded the patch and the patched .spec file to ftp://ftp.tummy.com/pub/tummy/Python/patches/

Let me know how this looks, and I'll either fix it or submit it as a patch.

Thanks, Sean

eacf80b2-9081-4882-a7f5-27e9644c3853 commented 20 years ago

Logged In: YES user_id=81797

Please go ahead and close this.

See \<a href="http://sourceforge.net/tracker/index.php?func=detail&aid=855999&group_id=5470&atid=305470"\>patch bpo-855999\</a>, which includes a patch for the .spec file which seems to work with Fedora Core 1.

I've also uploaded a new SRPM and Fedora binaries to the FTP site, and will be updating the web-page in a bit.

Sean

akuchling commented 20 years ago

Logged In: YES user_id=11375

Closed per jafo's request.