Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Build fails with clang on MacOS #907

Closed
awvwgk opened this issue May 11, 2023 · 2 comments · Fixed by #914
Closed

Build fails with clang on MacOS #907

awvwgk opened this issue May 11, 2023 · 2 comments · Fixed by #914
Assignees
Labels
bug Something isn't working

Comments

@awvwgk
Copy link
Member

awvwgk commented May 11, 2023

Description

Building fpm for conda-forge results in the following error:


././src/fpm_os.c:12:10: error: incompatible pointer to integer conversion returning 'char *' from a function with result type 'int' [-Wint-conversion]
  return realpath(path, resolved_path);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
<ERROR> Compilation failed for object " src_fpm_os.c.o "
<ERROR> stopping due to failed compilation
STOP 1

Expected Behaviour

Using clang on MacOS as C compiler should work as expected

Version of fpm

0.8.2

Platform and Architecture

MacOS/x86_64

Additional Information

See conda-forge/fpm-feedstock#18

@awvwgk awvwgk added the bug Something isn't working label May 11, 2023
@perazz
Copy link
Member

perazz commented May 12, 2023

I believe it happens because the interface is incompatible:

int c_realpath(char* path, char* resolved_path, int maxLength) {

should return a char*. I had fixed it here, @minhqdao this should be an easy one, can I ask you to take care of it?

@barracuda156
Copy link
Contributor

@awvwgk 0.8.2 built fine with Clang on macOS 13 for us: https://github.com/macports/macports-ports/actions/runs/4957808218/jobs/8869925080?pr=18637

However since 0.8.x there is another weird problem: often download fails, like here:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   280  100   280    0     0   1404      0 --:--:-- --:--:-- --:--:--  1465
Could not fetch the latest release from GitHub. Install curl or wget, and ensure network connectivity.

https://build.macports.org/builders/ports-10.15_x86_64-builder/builds/136455/steps/install-port/logs/stdio

Something is broken with this.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants