Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#59313 closed defect (fixed)

asco port installation fails with 'malloc.h' file not found

Reported by: hadrabap (Petr Hadraba) Owned by: rowue (Rolf Würdemann)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: asco

Description

When installing the asco @0.4.9_0 port, the Building asco phase fails with

nmlatest.c:55:10: fatal error: 'malloc.h' file not found

Attachments (1)

main.log (163.5 KB) - added by hadrabap (Petr Hadraba) 5 years ago.
Build log file

Download all attachments as: .zip

Change History (9)

Changed 5 years ago by hadrabap (Petr Hadraba)

Attachment: main.log added

Build log file

comment:1 Changed 5 years ago by kencu (Ken)

We have decided to solve the missing-sdk problem by harmonizing the build environment to require the command line tools be installed; it was the only workable solution to the problem at present.

If you take 5 minutes to install the command line tools, you should find that this, and many similar errors, disappear.

Please report back with success or failure after doing that.

Thanks!

comment:2 Changed 5 years ago by hadrabap (Petr Hadraba)

Hello, thanks for reply. I already do have Command Line Tools installed:

localhost:~ petr$ cd /Library/Developer/
.DS_Store          CommandLineTools/  CoreSimulator/     Documentation/     PrivateFrameworks/ Toolchains/        
localhost:~ petr$ cd /Library/Developer/CommandLineTools/
localhost:CommandLineTools petr$ la
total 0
drwxr-xr-x  5 root  admin  - 160 Jun  4 16:25 .
drwxrwxr-x@ 8 root  admin  - 256 Aug 25 13:33 ..
drwxr-xr-x  6 root  admin  - 192 Jun  4 16:25 Library
drwxr-xr-x  6 root  wheel  - 192 Sep 21 22:08 SDKs
drwxr-xr-x  7 root  admin  - 224 Mar 28  2019 usr
localhost:CommandLineTools petr$ cd SDKs/
localhost:SDKs petr$ la
total 0
drwxr-xr-x  6 root  wheel  - 192 Sep 21 22:08 .
drwxr-xr-x  5 root  admin  - 160 Jun  4 16:25 ..
lrwxr-xr-x  1 root  wheel  -  15 Sep 21 22:07 MacOSX.sdk -> MacOSX10.15.sdk
drwxr-xr-x  7 root  wheel  - 224 Jun  4 16:25 MacOSX.sdk 1
lrwxr-xr-x  1 root  wheel  -  10 Apr 18 16:57 MacOSX10.14.sdk -> MacOSX.sdk
drwxr-xr-x  8 root  wheel  - 256 Sep 21 22:08 MacOSX10.15.sdk
localhost:SDKs petr$ 

I have the latest stable version for Xcode 11 from developer.apple.com (Command_Line_Tools_for_Xcode_11.dmg).

And the malloc.h exists on my filesystem:

localhost:SDKs petr$ mdfind -name malloc.h | grep ^/Library
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk 1/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/malloc.h
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk 1/usr/include/sys/malloc.h
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk 1/usr/include/malloc/malloc.h
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk 1/usr/include/malloc/_malloc.h
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/libkern/OSMalloc.h
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/malloc.h
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk 1/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/libkern/OSMalloc.h
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/malloc.h
/Library/Developer/CommandLineTools/Library/PrivateFrameworks/LLDB.framework/Versions/A/Resources/Clang/include/mm_malloc.h
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/malloc/malloc.h
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/malloc/_malloc.h
/Library/Developer/CommandLineTools/usr/lib/clang/11.0.0/include/mm_malloc.h
/Library/Developer/CommandLineTools/usr/lib/tapi/11.0.0/include/mm_malloc.h
/Library/Developer/CommandLineTools/usr/lib/llvm-gcc/4.2.1/include/mm_malloc.h
localhost:SDKs petr$ 

Maybe my environment is kind of broken. :-(

Thanks in advance,

PETR

comment:3 Changed 5 years ago by mf2k (Frank Schima)

Keywords: xcode11 added; mojave Xcode11 removed

comment:4 Changed 5 years ago by mf2k (Frank Schima)

Owner: set to rowue
Status: newassigned

comment:5 Changed 5 years ago by jmroot (Joshua Root)

The code is probably just including an inappropriate header. Neither malloc/malloc.h nor sys/malloc.h are the same as the (nonstandard) malloc.h that exists on some other platforms. If the code just wants malloc, the standard place to find it is stdlib.h.

comment:6 Changed 5 years ago by kencu (Ken)

petr, Josh is right, but this looks a bit strange to me.

localhost:SDKs petr$ la
total 0
drwxr-xr-x  6 root  wheel  - 192 Sep 21 22:08 .
drwxr-xr-x  5 root  admin  - 160 Jun  4 16:25 ..
lrwxr-xr-x  1 root  wheel  -  15 Sep 21 22:07 MacOSX.sdk -> MacOSX10.15.sdk
drwxr-xr-x  7 root  wheel  - 224 Jun  4 16:25 MacOSX.sdk 1
lrwxr-xr-x  1 root  wheel  -  10 Apr 18 16:57 MacOSX10.14.sdk -> MacOSX.sdk
drwxr-xr-x  8 root  wheel  - 256 Sep 21 22:08 MacOSX10.15.sdk

have you changed some things around in this dir?

If so, you might need to replace those entries with new ones.

Version 0, edited 5 years ago by kencu (Ken) (next)

comment:7 Changed 5 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: assignedclosed

In 1304b4892d9b08fe176ceba8bd74414e76c404de/macports-ports (master):

asco: fix build without /usr/include

The malloc.h include is unneeded, so just remove it.

Fixes: #59313

comment:8 Changed 5 years ago by jmroot (Joshua Root)

Keywords: xcode11 removed
Note: See TracTickets for help on using tickets.