Skip to content

argument not found on ARM linux only #1919

@sab24

Description

@sab24

The following code

#include <fmt/core.h>
#include <iostream>

int main() {
    std::cout << fmt::format("{0}, {1}, {2}", 'a', 'b', 'c');
    return 0;
}

compiled with

clang++ fmttest.cpp -o fmttest /usr/local/lib/libfmt.a

on archlinuxarm gives

./fmttest
terminate called after throwing an instance of 'fmt::v7::format_error'
  what():  argument not found

while on MacOS it gives

./fmttest
a, b, c

Both versions are compiled from source from the latest source version.

However, compiling with format.cc seems to solve the issue:

clang++ fmttest.cpp -o fmttest -I /home/user/Downloads/fmt/include /home/user/Downloads/fmt/build/libfmt.a -v
./fmttest
./fmttest
terminate called after throwing an instance of 'fmt::v7::format_error'
  what():  argument not found
Aborted (core dumped)
clang++ fmttest.cpp -o fmttest -I /home/user/Downloads/fmt/include /home/user/Downloads/fmt/src/format.cc -v
./fmttest
a, b, c

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