Bug 151597 - [patch] can't build devel/py-jsonlib with python 2.4
Summary: [patch] can't build devel/py-jsonlib with python 2.4
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Wen Heping
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-20 12:50 UTC by Ilya A. Arhipov
Modified: 2010-10-29 09:41 UTC (History)
0 users

See Also:


Attachments
file.diff (371 bytes, patch)
2010-10-20 12:50 UTC, Ilya A. Arhipov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ilya A. Arhipov 2010-10-20 12:50:07 UTC
don't build py-jsonlib with python 2.4

creating temp.freebsd-8.1-RELEASE-i386-2.4
cc -fno-strict-aliasing -DNDEBUG -O2 -pipe -D__wchar_t=wchar_t -DTHREAD_STACK_SIZE=0x20000 -fno-strict-aliasing -O2 -pipe -fno-strict-aliasing -fPIC -I/usr/local/include/python2.4 -c _jsonlib.c -o temp.freebsd-8.1-RELEASE-i386-2.4/_jsonlib.o
_jsonlib.c:1428: error: expected declaration specifiers or '...' before 'Py_ssize_t'
_jsonlib.c: In function 'serializer_validate_string':
_jsonlib.c:1430: error: 'Py_ssize_t' undeclared (first use in this function)
_jsonlib.c:1430: error: (Each undeclared identifier is reported only once
_jsonlib.c:1430: error: for each function it appears in.)
_jsonlib.c:1430: error: expected ';' before 'ii'
_jsonlib.c:1433: error: 'ii' undeclared (first use in this function)
_jsonlib.c:1433: error: 'char_count' undeclared (first use in this function)
_jsonlib.c: In function 'serialize_unicode':
_jsonlib.c:1460: error: 'Py_ssize_t' undeclared (first use in this function)
_jsonlib.c:1460: error: expected ';' before 'char_count'
_jsonlib.c:1467: error: 'char_count' undeclared (first use in this function)
_jsonlib.c:1468: error: 'ii' undeclared (first use in this function)
_jsonlib.c:1491: error: too many arguments to function 'serializer_validate_string'
_jsonlib.c: In function 'serialize_dict':
_jsonlib.c:1580: error: 'Py_ssize_t' undeclared (first use in this function)
_jsonlib.c:1580: error: expected ';' before 'dict_pos'
_jsonlib.c:1593: error: 'dict_pos' undeclared (first use in this function)
_jsonlib.c: In function 'serializer_append_unicode':
_jsonlib.c:1994: error: 'Py_ssize_t' undeclared (first use in this function)
_jsonlib.c:1994: error: expected ';' before 'ii'
_jsonlib.c:1999: error: 'ii' undeclared (first use in this function)
_jsonlib.c:1999: error: 'len_text' undeclared (first use in this function)
error: command 'cc' failed with exit status 1
*** Error code 1

Stop in /usr/ports/devel/py-jsonlib.
*** Error code 1

Fix: http://www.python.org/dev/peps/pep-0353/

#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
typedef int Py_ssize_t;
#define PY_SSIZE_T_MAX INT_MAX
#define PY_SSIZE_T_MIN INT_MIN
#endif

add in _jsonlib.c
patch in attache

Patch attached with submission follows:
How-To-Repeat: echo "PYTHON_VERSION=2.4" >> /etc/make.conf
make -C /usr/ports/devel/py-jsonlib install clean
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2010-10-23 08:54:50 UTC
Responsible Changed
From-To: freebsd-ports-bugs->wen

Fix synopsis and assign.
Comment 2 dfilter service freebsd_committer freebsd_triage 2010-10-29 09:38:37 UTC
wen         2010-10-29 08:38:33 UTC

  FreeBSD ports repository

  Modified files:
    devel/py-jsonlib     Makefile 
  Added files:
    devel/py-jsonlib/files patch-_jsonlib.c 
  Log:
  - Fix build with python-2.4
  
  PR:             ports/151597
  Submitted by:   "Ilya A. Arhipov" <pa36ouHu4er@yandex.ru>
  
  Revision  Changes    Path
  1.9       +1 -0      ports/devel/py-jsonlib/Makefile
  1.1       +14 -0     ports/devel/py-jsonlib/files/patch-_jsonlib.c (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Wen Heping freebsd_committer freebsd_triage 2010-10-29 09:41:26 UTC
State Changed
From-To: open->closed

Committed. Thanks!