Skip to content

failure to build on NetBSD 10 amd64 with erlang 27.3.4.7 #189

@gdt

Description

@gdt

(I maintain ejabberd and requirements in pkgsrc, a multi-OS multi-version multi-CPU packaging system.)

I recently updated our erlang-jose package from 1.11.10 to 1.11.12. It built for me - but while buiding 1.11.12 I had 1.11.10 installed. I then started getting complaints from bulk builds (validation of package builds with only specified dependencies present) and I can repeatedly build ok with an already installed package, and fail without.

I have elixir 1.17.2.

The essence of the failure is:

===> Building for erlang-jose-1.11.12
 DEPEND jose.d
warning: the VM is running with native name encoding of latin1 which may cause Elixir to malfunction as it expects utf8. Please ensure your locale is set to UTF-8 (which can be verified by running "locale" in your shell) or set the ELIXIR_ERL_OPTIONS="+fnu" environment variable

== Compilation error in file lib/jose/jws.ex ==
** (ArgumentError) lib file jose/include/jose_jws.hrl could not be found
    (elixir 1.17.2) lib/record/extractor.ex:41: Record.Extractor.from_lib_file/1
    (elixir 1.17.2) lib/record/extractor.ex:18: Record.Extractor.from_or_from_lib_file/1
    (elixir 1.17.2) lib/record/extractor.ex:5: Record.Extractor.extract/2
    lib/jose/jws.ex:218: (module)

(I have tried to set environment variables about the utf-8 warning, but I don't see why include paths would be related to locale as it's all ASCII.)

My impression is that the line in question:

record = Record.extract(:jose_jws, from_lib: "jose/include/jose_jws.hrl")

finds the installed jose_jws.hrl file when it is present. It seems obvious (dangerous I know) that during the build it should be using the version in the sources and not even trying to load an installed file.

I do see that there is no NetBSD equivalent to

else ifeq ($(PLATFORM),freebsd)
        CC ?= cc
        CFLAGS ?= -O3 -std=c99 -finline-functions -Wall -Wmissing-prototypes
        CXXFLAGS ?= -O3 -finline-functions -Wall

but that's not setting -I.

Running gmake in the unpacked tarball gets the same error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions