Skip to content

Build fails with option USE_INTERNAL_FPCONV #117

@michael0710

Description

@michael0710

Observed behaviour

When lua-cjson is built with luarocks, the build fails if the option USE_INTERNAL_FPCONV is provided in the rockspec file.

The error message reads as follows:

fpconv.c:205:6: error: redefinition of 'fpconv_init'
 void fpconv_init(void)
      ^~~~~~~~~~~
In file included from fpconv.c:36:
fpconv.h:19:20: note: previous definition of 'fpconv_init' was here
 static inline void fpconv_init()
                    ^~~~~~~~~~~

Error: Build error: Failed compiling object fpconv.o

Steps to reproduce

  1. Download the source
  2. Alter the .rockspec file in line 54 by adding the "USE_INTERNAL_FPCONV" option
  3. Run the luarocks make command in the source directory

Platform information

luarocks 3.12.2
Lua 5.4.8
OS: Microsoft Windows 11 Pro
OS Version: 10.0.26100 Build 26100
Hardware: x64

As the fpconv_init() function is defined with the keywords static inline if USE_INTERNAL_FPCONV is defined in fpconv.h, I think the definition of the function in fpconv.c shall be enclosed in an #ifndef USE_INTERNAL_FPCONV block.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions