pnnl/lamellar-runtime

Error: cannot find function `rofi_sub_alloc` in crate `rofisys`

jb606 opened this issue · 2 comments

jb606 commented

cargo build --release --features enable-rofi will error out (log below) despite having the dependencies loaded. I'm sure it is something on my end but I have no idea where to look next. Thanks

Error:

error[E0425]: cannot find function 
`rofi_sub_alloc` in crate `rofisys`
   --> src/lamellae/rofi/rofi_api.rs:46:50
    |
46  |               AllocationType::Sub(pes) => rofisys::rofi_sub_alloc(
    |                                                    ^^^^^^^^^^^^^^ help: a function with a similar name exists: `rofi_alloc`
    |
   ::: /scratch/shared/apps/lamellar-runtime/build/lamellar-runtime/target/release/build/rofisys-0de24f72639c8fdf/out/bindings.rs:113:5
    |
113 | /     pub fn rofi_alloc(
114 | |         arg1: usize,
115 | |         arg2: ::std::os::raw::c_ulong,
116 | |         arg3: *mut *mut ::std::os::raw::c_void,
117 | |     ) -> ::std::os::raw::c_int;
    | |______________________________- similarly named function `rofi_alloc` defined here

For more information about this error, try `rustc --explain E0425`.

Thanks for the issue! There are a couple reasons this could be happening, depending on how your install is configured.

Hopefully the easiest solution will be to do:
0. cargo clean

  1. rm Cargo.lock
  2. cargo update
  3. cargo build --release --features enable-rofi

If this does not work, it likely means you have downloaded "Rofi" manually and have set the ROFI_DIR environment variable to point to that install directory.

In this case you have two options, either unset ROFI_DIR (rofisys now contains the rofi c lib within it and can build it automatically for you) or update your Rofi installation to the latest version from https://github.com/pnnl/rofi (if you run grep -irn . -e "rofi_sub_alloc" within the rofi directory it should return a match), rebuild it, and then try building lamellar again.

If this still doesnt work I will happy to help with further troubleshooting!

jb606 commented

@rdfriese Thank you! The problem was an external ROFI_DIR from a separate module I was loading on the cluster.

Thanks Again!