Bug 259951 - net/shadowsocks: fix build error on 14.0-CURRENT
Summary: net/shadowsocks: fix build error on 14.0-CURRENT
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Xin LI
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-20 17:07 UTC by xiaoding+freebsd
Modified: 2021-11-24 06:06 UTC (History)
1 user (show)

See Also:
xiaoding+freebsd: maintainer-feedback+


Attachments
remove the clearenv() definition in libcork on 14.0-CURRENT (1.00 KB, patch)
2021-11-20 17:07 UTC, xiaoding+freebsd
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description xiaoding+freebsd 2021-11-20 17:07:15 UTC
Created attachment 229614 [details]
remove the clearenv() definition in libcork on 14.0-CURRENT

The library "libcork" included with shadowsocks-libev failed to build on 14.0-CURRENT.

----------------------------
libtool: compile:  cc -DHAVE_CONFIG_H -I. -I.. -I../libcork/include -DCORK_API=CORK_LOCAL -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -I/usr/local/include -DPCRE_STATIC -pthread -fstack-protector -MT src/libcork/posix/libcork_la-env.lo -MD -MP -MF src/libcork/posix/.deps/libcork_la-env.Tpo -c src/libcork/posix/env.c  -fPIC -DPIC -o src/libcork/posix/.libs/libcork_la-env.o
src/libcork/posix/env.c:198:1: error: static declaration of 'clearenv' follows non-static declaration
clearenv(void)
^
/usr/include/stdlib.h:286:6: note: previous declaration is here
int      clearenv(void);
         ^
1 error generated.
----------------------------

After investigation, it was found that a new clearenv(3) function was added to the stdlib. [1]

In order to continue the build, we need to remove the clearenv() definition in libcork on 14.0-CURRENT.

[1] https://github.com/freebsd/freebsd-src/commit/597b02675751e48dd04777f1e91fee382bf3a966
Comment 1 commit-hook freebsd_committer 2021-11-24 06:06:33 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0d391b9c88a96b439c58aa222d3437a93231db14

commit 0d391b9c88a96b439c58aa222d3437a93231db14
Author:     Xiaoding Liu <xiaoding+freebsd@xiaoding.org>
AuthorDate: 2021-11-24 06:01:47 +0000
Commit:     Xin LI <delphij@FreeBSD.org>
CommitDate: 2021-11-24 06:05:09 +0000

    net/shadowsocks-libev: fix build error on 14.0-CURRENT

    PR:             ports/259951

 .../patch-libcork_src_libcork_posix_env.c (new)    | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
Comment 2 commit-hook freebsd_committer 2021-11-24 06:06:33 UTC
A commit in branch 2021Q4 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=18a47d7c81c82c753c8f43fe1ab0c2384f0c63d7

commit 18a47d7c81c82c753c8f43fe1ab0c2384f0c63d7
Author:     Xiaoding Liu <xiaoding+freebsd@xiaoding.org>
AuthorDate: 2021-11-24 06:01:47 +0000
Commit:     Xin LI <delphij@FreeBSD.org>
CommitDate: 2021-11-24 06:06:04 +0000

    net/shadowsocks-libev: fix build error on 14.0-CURRENT

    PR:             ports/259951
    (cherry picked from commit 0d391b9c88a96b439c58aa222d3437a93231db14)

 .../patch-libcork_src_libcork_posix_env.c (new)    | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)