Opened 9 months ago

Closed 5 days ago

#61823 closed defect (fixed)

py38-reportlab 3.5.46_0: missing #include <string.h>

Reported by: greyhare Owned by: stromnov (Andrew Stromnov)
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: reportlab bigsur Cc: MaddTheSane (C.W. Betts)
Port: py38-reportlab, py39-reportlab

Description

Trying to build py38-reportlab on Big Sur and it's not building. Digging into the log, this seems to be the error:

:info:build src/rl_addons/renderPM/gt1/gt1-namecontext.c:100:9: error: implicitly declaring library function 'strlen' with type 'unsigned long (const char *)' [-Werror,-Wimplicit-function-declaration]
:info:build   len = strlen (s);
:info:build         ^
:info:build src/rl_addons/renderPM/gt1/gt1-namecontext.c:100:9: note: include the header <string.h> or explicitly provide a declaration for 'strlen'
:info:build src/rl_addons/renderPM/gt1/gt1-namecontext.c:102:3: error: implicitly declaring library function 'memcpy' with type 'void *(void *, const void *, unsigned long)' [-Werror,-Wimplicit-function-declaration]
:info:build   memcpy (new, s, len);
:info:build   ^
:info:build src/rl_addons/renderPM/gt1/gt1-namecontext.c:102:3: note: include the header <string.h> or explicitly provide a declaration for 'memcpy'
:info:build src/rl_addons/renderPM/gt1/gt1-namecontext.c:172:10: error: implicitly declaring library function 'strcmp' with type 'int (const char *, const char *)' [-Werror,-Wimplicit-function-declaration]
:info:build     if (!strcmp (nc->table[i & mask].name, name))
:info:build          ^
:info:build src/rl_addons/renderPM/gt1/gt1-namecontext.c:172:10: note: include the header <string.h> or explicitly provide a declaration for 'strcmp'
:info:build 3 errors generated.
:info:build error: command '/usr/bin/clang' failed with exit status 1
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-reportlab/py38-reportlab/work/reportlab-3.5.46" && /opt/local/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 setup.py --no-user-cfg build -j8 
:info:build Exit code: 1
:error:build Failed to build py38-reportlab: command execution failed

Looking at src/rl_addons/renderPM/gt1/gt1-namecontext.c, it starts out like this:

/* A module for a simple "name context", i.e. lisp-style atoms */

#include "gt1-misc.h"

#include "gt1-namecontext.h"
#if defined(_WIN32) || defined(macintosh)
#	include <string.h>
#endif

So it looks like macintosh isn't getting defined. That's as far as I can push this.

Change History (6)

comment:1 Changed 9 months ago by jmroot (Joshua Root)

Owner: set to stromnov
Status: newassigned

comment:2 Changed 2 months ago by MaddTheSane (C.W. Betts)

Cc: MaddTheSane added

comment:3 Changed 2 months ago by MaddTheSane (C.W. Betts)

This is also present in py39-reportlab, and probably all reportlab Python packages.

comment:4 Changed 2 months ago by greyhare

Port: py39-reportlab added

comment:5 Changed 10 days ago by jack-moon-nt

py27-reportlab is giving the same error log

comment:6 Changed 5 days ago by reneeotten (Renee Otten)

Resolution: fixed
Status: assignedclosed

In 77c648466cbd33150bfaa6776d323117867d2399/macports-ports (master):

py-reportlab: update to 3.6.1, drop PY35

Closes: #61823

Note: See TracTickets for help on using tickets.