ProcursusTeam / Procursus

Modern *OS Bootstrap
https://apt.procurs.us
BSD Zero Clause License
861 stars 126 forks source link

Package request: graphviz / dot #913

Open lccambiaghi opened 2 years ago

lccambiaghi commented 2 years ago

I downloaded the tarball, ran ./configure --build=aarch64-apple-darwin --host=aarch64-apple-darwin but then got error 2 on make.

demhademha commented 2 years ago

Could you paste the output of make

lccambiaghi commented 2 years ago
❯ make
make  all-recursive
make[1]: Entering directory '/private/var/mobile/graphviz-2.48.0'
Making all in libltdl
make[2]: Entering directory '/private/var/mobile/graphviz-2.48.0/libltdl'
make  all-am
make[3]: Entering directory '/private/var/mobile/graphviz-2.48.0/libltdl'
  CCLD     libltdlc.la
make[3]: *** [Makefile:633: libltdlc.la] Error 1
make[3]: Leaving directory '/private/var/mobile/graphviz-2.48.0/libltdl'
make[2]: *** [Makefile:505: all] Error 2
make[2]: Leaving directory '/private/var/mobile/graphviz-2.48.0/libltdl'
make[1]: *** [Makefile:832: all-recursive] Error 1
make[1]: Leaving directory '/private/var/mobile/graphviz-2.48.0'
make: *** [Makefile:640: all] Error 2
demhademha commented 2 years ago

Could you try, make VERBOSE=1 or, reconfigure the package with --disable-silent-rules This should produce a more verbose make output

lccambiaghi commented 2 years ago

I just tried to install libltdl7 and libltdl-dev but still got the same error. make VERBOSE=1 gives the same output. make -d gives the below:

Finished prerequisites of target file 'libltdlc.la'.
  Must remake target 'libltdlc.la'.
Putting child 0x101425170 (libltdlc.la) PID 18324 on the chain.
Live child 0x101425170 (libltdlc.la) PID 18324 
  CCLD     libltdlc.la
Reaping losing child 0x101425170 PID 18324 
make[3]: *** [Makefile:633: libltdlc.la] Error 1
Removing child 0x101425170 PID 18324 from chain.
make[3]: Leaving directory '/private/var/mobile/graphviz-2.48.0/libltdl'
Reaping losing child 0x100e1a6c0 PID 18321 
make[2]: *** [Makefile:505: all] Error 2
Removing child 0x100e1a6c0 PID 18321 from chain.
make[2]: Leaving directory '/private/var/mobile/graphviz-2.48.0/libltdl'
Reaping losing child 0x10070fb30 PID 18313 
make[1]: *** [Makefile:832: all-recursive] Error 1
Removing child 0x10070fb30 PID 18313 from chain.
make[1]: Leaving directory '/private/var/mobile/graphviz-2.48.0'
Reaping losing child 0x12e807700 PID 18312 
make: *** [Makefile:640: all] Error 2
Removing child 0x12e807700 PID 18312 from chain.
demhademha commented 2 years ago

Could you try, ./configure --prefix=/usr --build=aarch64-apple-darwin --host=aarch64-apple-darwin --disable-silent-rules Then run make and paste the output of that?

demhademha commented 2 years ago

I have isolated the issue:

/usr/share/SDKs/iPhoneOS.sdk/usr/include/stdlib.h:190:6: note: 'system' has been explicitly marked unavailable here
int      system(const char *) __DARWIN_ALIAS_C(system);
         ^
1 error generated.

One solution could be to patch your sdk, at the indicated file

lccambiaghi commented 2 years ago

Wow amazing, thank you for the help! How would I go about patching that file?

demhademha commented 2 years ago
#if TARGET_OS_IPHONE
#define __swift_unavailable_on(osx_msg, ios_msg) __swift_unavailable(ios_msg)
#else
#define __swift_unavailable_on(osx_msg, ios_msg) __swift_unavailable(osx_msg)
#endif
__swift_unavailable_on("Use posix_spawn APIs or NSTask instead.", "Process spawning is unavailable")
__API_AVAILABLE(macos(10.0)) __IOS_PROHIBITED
__WATCHOS_PROHIBITED __TVOS_PROHIBITED
int  system(const char *) __DARWIN_ALIAS_C(system);
#undef __swift_unavailable_on

This is located in stdlib.h of the sdk, remove the check

demhademha commented 2 years ago

If it'd be more convenient for you, I could add this to procursus

demhademha commented 2 years ago

An alternative solution would be to copy stdlib.h from build_base of the procursus directory to your SDK

lccambiaghi commented 2 years ago

Hi @demhademha, I would really appreciate if you could add the package to Procursus. In case you don’t have time, I will try to replace the stdlib.h file myself.