Can't Compile on macOS
BaxW opened this issue · comments
Baxter Worthing commented
Hi,
I'm trying to compile gfaestus on MacOS 10.14.2 but I can't get past this error:
$ git clone --recursive https://github.com/chfi/gfaestus.git
Cloning into 'gfaestus'...
remote: Enumerating objects: 9657, done.
remote: Counting objects: 100% (9657/9657), done.
remote: Compressing objects: 100% (3964/3964), done.
remote: Total 9657 (delta 7291), reused 7853 (delta 5491), pack-reused 0
Receiving objects: 100% (9657/9657), 1.89 MiB | 1.91 MiB/s, done.
Resolving deltas: 100% (7291/7291), done.
$ cd gfaestus/
$ RUST_BACKTRACE=full
$ cargo build --release
Compiling libc v0.2.101
Compiling autocfg v1.0.1
Compiling cfg-if v1.0.0
Compiling proc-macro2 v1.0.24
Compiling libm v0.2.1
Compiling unicode-xid v0.2.1
Compiling syn v1.0.60
Compiling bitflags v1.2.1
Compiling version_check v0.9.2
Compiling lazy_static v1.4.0
Compiling crossbeam-utils v0.8.5
Compiling memchr v2.3.4
Compiling getrandom v0.2.2
Compiling scopeguard v1.1.0
Compiling foreign-types-shared v0.1.1
Compiling core-foundation-sys v0.8.2
Compiling once_cell v1.5.2
Compiling crossbeam-epoch v0.9.5
Compiling getrandom v0.1.16
Compiling block v0.1.6
Compiling ppv-lite86 v0.2.10
Compiling log v0.4.14
Compiling static_assertions v1.1.0
Compiling core-foundation-sys v0.7.0
Compiling futures-core v0.3.15
Compiling proc-macro-hack v0.5.19
Compiling rayon-core v1.9.0
Compiling ryu v1.0.5
Compiling lexical-core v0.7.6
Compiling futures-channel v0.3.15
Compiling futures-task v0.3.15
Compiling byteorder v1.4.2
Compiling typenum v1.12.0
Compiling proc-macro-nested v0.1.7
Compiling anyhow v1.0.38
Compiling crossbeam-queue v0.3.2
Compiling ttf-parser v0.12.3
Compiling regex-syntax v0.6.22
Compiling arrayvec v0.5.2
Compiling futures-sink v0.3.15
Compiling rawpointer v0.2.1
Compiling unicode-segmentation v1.8.0
Compiling either v1.6.1
Compiling slab v0.4.2
Compiling ab_glyph_rasterizer v0.1.4
Compiling futures-io v0.3.15
Compiling pin-project-lite v0.2.6
Compiling pin-utils v0.1.0
Compiling smallvec v1.6.1
Compiling paste v1.0.4
Compiling cc v1.0.66
Compiling argh_shared v0.1.5
Compiling atomic_refcell v0.1.6
Compiling cfg-if v0.1.10
Compiling fnv v1.0.7
Compiling winit v0.25.0
Compiling emath v0.14.0
Compiling glob v0.3.0
Compiling yansi v0.5.0
Compiling gfaestus v0.1.0 (/Users/baxter/gfaestus)
Compiling dispatch v0.2.0
Compiling colorous v1.0.5
Compiling rustc-hash v1.1.0
Compiling futures-timer v3.0.2
Compiling libloading v0.7.0
Compiling instant v0.1.10
Compiling num-traits v0.2.14
Compiling memoffset v0.6.1
Compiling num-integer v0.1.44
Compiling futures-macro v0.3.15
Compiling num-rational v0.3.2
Compiling futures-util v0.3.15
Compiling rayon v1.5.0
Compiling ahash v0.7.0
Compiling generic-array v0.14.4
Compiling nom v5.1.2
Compiling lock_api v0.4.2
Compiling foreign-types v0.3.2
Compiling thread_local v1.1.3
Compiling smartstring v0.2.9
Compiling regex-automata v0.1.9
Compiling matrixmultiply v0.2.4
Compiling heck v0.3.3
Compiling owned_ttf_parser v0.12.1
Compiling vk-mem v0.2.2
Compiling ash v0.32.0
Compiling ab_glyph v0.2.11
Compiling quote v1.0.8
Compiling crossbeam-channel v0.5.1
Compiling malloc_buf v0.0.6
Compiling num_cpus v1.13.0
Compiling raw-window-handle v0.3.3
Compiling time v0.1.43
Compiling memmap v0.7.0
Compiling atty v0.2.14
Compiling parking_lot_core v0.8.2
Compiling aho-corasick v0.7.15
Compiling bstr v0.2.15
Compiling core-foundation v0.9.1
Compiling core-foundation v0.7.0
Compiling num-complex v0.3.1
Compiling approx v0.4.0
Compiling ordered-float v2.1.1
Compiling succinct v0.5.2
Compiling rand_core v0.6.1
Compiling objc v0.2.7
Compiling rand_core v0.5.1
Compiling parking_lot v0.11.1
Compiling regex v1.4.3
Compiling core-graphics-types v0.1.1
Compiling core-graphics v0.19.2
Compiling crossbeam-deque v0.8.0
Compiling chrono v0.4.19
Compiling simba v0.3.1
Compiling wyhash v0.5.0
Compiling rand_chacha v0.3.1
Compiling epaint v0.14.0
Compiling rand_chacha v0.2.2
Compiling objc_id v0.1.1
Compiling core-graphics v0.22.2
Compiling cocoa-foundation v0.1.0
Compiling core-video-sys v0.1.4
Compiling crossbeam v0.8.1
Compiling bytemuck_derive v1.0.1
Compiling thiserror-impl v1.0.28
Compiling argh_derive v0.1.5
Compiling rhai_codegen v1.0.0
Compiling rand v0.8.4
Compiling egui v0.14.2
Compiling rand v0.7.3
Compiling objc-foundation v0.1.1
Compiling cocoa v0.24.0
Compiling bytemuck v1.7.2
Compiling thiserror v1.0.28
Compiling argh v0.1.5
Compiling rhai v1.0.2
Compiling rand_distr v0.3.0
Compiling clipboard v0.5.0
Compiling gfa v0.10.0
Compiling rgb v0.8.25
Compiling raw-window-metal v0.1.2
Compiling boomphf v0.5.9
Compiling flexi_logger v0.18.0
Compiling futures-executor v0.3.15
Compiling nalgebra v0.24.1
Compiling ash-window v0.6.0
Compiling handlegraph v0.7.0-alpha.9 (https://github.com/chfi/rs-handlegraph#6b0a807b)
Compiling futures v0.3.15
Compiling nalgebra-glm v0.10.0
error[E0423]: expected value, found struct `InstanceExtensions`
--> src/vulkan/init.rs:64:31
|
64 | instance_extensions = InstanceExtensions;
| ^^^^^^^^^^^^^^^^^^
...
535 | pub struct InstanceExtensions {}
| -------------------------------- `InstanceExtensions` defined here
|
help: use struct literal syntax instead
|
64 | instance_extensions = InstanceExtensions {};
| ~~~~~~~~~~~~~~~~~~~~~
help: a local variable with a similar name exists
|
64 | instance_extensions = instance_extensions;
| ~~~~~~~~~~~~~~~~~~~
warning: unused import: `std::sync::Arc`
--> src/app.rs:22:5
|
22 | use std::sync::Arc;
| ^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unused import: `crate::app::selection::NodeSelection`
--> src/app.rs:29:5
|
29 | use crate::app::selection::NodeSelection;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: unused macro definition: `handle`
--> src/app.rs:418:30
|
418 | macro_rules! handle {
| ^^^^^^
|
= note: `#[warn(unused_macros)]` on by default
warning: unused imports: `HashMap`, `HashSet`, `path::PathBuf`
--> src/context.rs:2:19
|
2 | collections::{HashMap, HashSet},
| ^^^^^^^ ^^^^^^^
3 | path::PathBuf,
| ^^^^^^^^^^^^^
warning: unused imports: `Direction`, `mutablehandlegraph::*`
--> src/context.rs:13:14
|
13 | handle::{Direction, Handle, NodeId},
| ^^^^^^^^^
14 | handlegraph::*,
15 | mutablehandlegraph::*,
| ^^^^^^^^^^^^^^^^^^^^^
warning: unused imports: `Rect`, `selection::NodeSelection`
--> src/context.rs:24:11
|
24 | app::{selection::NodeSelection, App, AppChannels, AppMsg, SharedState},
| ^^^^^^^^^^^^^^^^^^^^^^^^
25 | geometry::{Point, Rect},
| ^^^^
warning: unused imports: `SinkExt`, `future::RemoteHandle`
--> src/reactor/modal.rs:2:15
|
2 | use futures::{future::RemoteHandle, SinkExt};
| ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^
warning: unused imports: `RwLockUpgradableReadGuard`, `RwLockWriteGuard`
--> src/reactor/modal.rs:4:37
|
4 | Mutex, RwLock, RwLockReadGuard, RwLockUpgradableReadGuard, RwLockWriteGuard,
| ^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
warning: unused import: `InstanceV1_0`
--> src/vulkan/draw_system/edges.rs:11:32
|
11 | use ash::version::{DeviceV1_0, InstanceV1_0};
| ^^^^^^^^^^^^
warning: unused import: `VecDeque`
--> src/annotations.rs:2:28
|
2 | collections::{HashMap, VecDeque},
| ^^^^^^^^
warning: unused import: `parking_lot::Mutex`
--> src/annotations.rs:18:5
|
18 | use parking_lot::Mutex;
| ^^^^^^^^^^^^^^^^^^
warning: unused import: `Annotations`
--> src/gui/console.rs:26:49
|
26 | AnnotationCollection, AnnotationRecord, Annotations, BedColumn,
| ^^^^^^^^^^^
warning: unused import: `quad_tree::*`
--> src/gui/console.rs:38:5
|
38 | quad_tree::*,
| ^^^^^^^^^^^^
warning: unused import: `self::text::draw_text_at_world_point`
--> src/gui.rs:63:5
|
63 | use self::text::draw_text_at_world_point;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: unused import: `packed`
--> src/context.rs:16:5
|
16 | packed::*,
| ^^^^^^
warning: unused import: `bstr::ByteSlice`
--> src/script/plugins.rs:346:13
|
346 | use bstr::ByteSlice;
| ^^^^^^^^^^^^^^^
For more information about this error, try `rustc --explain E0423`.
warning: `gfaestus` (lib) generated 16 warnings
error: could not compile `gfaestus` due to previous error; 16 warnings emitted
warning: build failed, waiting for other jobs to finish...
error: build failed
I'd appreciate any thoughts or advice on this. Thanks in advance!
Brett Chapman commented
I have the exact same error as well. I've been trying to get gfaestus to run on MacOS for some time without success. I'm not familiar with Rust, but I believe I've installed the VulkanSDK, installed MoltenVK, and installed Rust all properly.
The error appears to be referring to a struct:
error[E0423]: expected value, found struct `InstanceExtensions`
Groza Cristian commented
You can edit the offending line and add curly brackets:
instance_extensions = InstanceExtensions {};
This is a code path that does not run on linux, so it probably slipped past testing.
Baxter Worthing commented
Yes, this fixes the issue. Thanks!