facebook / facebook/zstd

Compiler warnings present when integrated with Swift Package Manager

Open
#3,892 0 comments 3 reactions 0 assignees View on GitHub
build
Dominant language
C
Stars
27.9k
Forks
2.6k
Avg merge
1d 3h
Merged PRs (30d)
8

Description

**Describe the bug**

There are bunch of warnings from `zstd.h` in the following form when compiling:
> Definition of configuration mac 'ZSTDLIB_VISIBLE' has no effect on the import of 'libzstd'; pass '-DZSTDLIB_VISIBLE=...' on the command line to configure the module

It is possible to have these preprocessor definitions in `cSettings` in the `Package.swift` integration site, but that should not be necessary in my opinion and the project should build without warnings.

**To Reproduce**

1. Use library with Swift Package Manager
2. Compile with `swift build`

**Expected behavior**

No warnings should be given.

**Screenshots and charts**

![image](https://github.com/facebook/zstd/assets/133648611/6fae113c-8381-4fd1-aa3c-8976c8364f92)

**Desktop (please complete the following information):**
- OS: macOS
- Version 14.2.1
- Compiler swiftc
- Flags n/a
- Other relevant hardware specs n/a
- Build system SPM

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.