Bug 255935 - lang/ecl: Make libatomic_ops a LIB_DEPENDS
Summary: lang/ecl: Make libatomic_ops a LIB_DEPENDS
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jimmy Olgeni
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-16 20:48 UTC by Kevin Zheng
Modified: 2021-05-17 14:45 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (olgeni)


Attachments
Proposed patch (1.14 KB, patch)
2021-05-16 20:48 UTC, Kevin Zheng
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Zheng 2021-05-16 20:48:03 UTC
Created attachment 225008 [details]
Proposed patch

In lang/ecl, libatomic_ops is currently a BUILD_DEPENDS and not a LIB_DEPENDS. However, libatomic_ops is required at run time for COMPILE-FILE to work. For example:

;;;; hello.lisp
(format t "Hello, world!")

;;;; ecl
> (compile-file "hello.lisp")
;;; Loading #P"/usr/local/lib/ecl-20.4.24/cmp.fas"
;;;
;;; Compiling hello.lisp.
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
;;; End of Pass 1.
;;; Internal error:
;;;   ** Error code 1 when executing
;;; (EXT:RUN-PROGRAM "cc" ("-I." "-I/usr/local/include/" "-isystem" "/usr/local/include" "-I/usr/local/include" "-O2" "-pipe" "-fstack-protector-strong" "-isystem" "/usr/local/include" "-fno-strict-aliasing" "-std=c99" "-fPIC" "-Dfreebsd" "-O2" "-c" "hello.c" "-o" "hello.o")):
;;; In file included from hello.c:5:
;;; In file included from /usr/local/include/ecl/ecl-cmp.h:33:
;;; In file included from /usr/local/include/ecl/ecl.h:89:
;;; In file included from /usr/local/include/ecl/stacks.h:23:
;;; /usr/local/include/ecl/ecl_atomics.h:23:12: fatal error: 'atomic_ops.h' file not found
;;; #  include <atomic_ops.h>
;;;            ^~~~~~~~~~~~~~
;;; 1 error generated.

The proposed patch (attached) makes libatomic_ops a LIB_DEPENDS.
Comment 1 Jimmy Olgeni freebsd_committer freebsd_triage 2021-05-17 14:39:56 UTC
Patched port says that "all LIB_DEPENDS should use the new format and start out with lib. (libfoo.so vs foo.so)", so I moved the dependency to RUN_DEPENDS.
Comment 2 commit-hook freebsd_committer freebsd_triage 2021-05-17 14:41:33 UTC
A commit in branch main references this bug:

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

commit f476e826631b6625b78f827bef4a9b7a170a3d27
Author:     Jimmy Olgeni <olgeni@FreeBSD.org>
AuthorDate: 2021-05-17 14:35:03 +0000
Commit:     Jimmy Olgeni <olgeni@FreeBSD.org>
CommitDate: 2021-05-17 14:40:22 +0000

    lang/ecl: compiler requires libatomic_ops in RUN_DEPENDS.

    PR:             255935
    Reported by:    Kevin Zheng <kevinz5000@gmail.com>

 lang/ecl/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 3 Jimmy Olgeni freebsd_committer freebsd_triage 2021-05-17 14:44:57 UTC
Seems to be ok now. Thanks! \o/