Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Enable new SQL generator on Mac #197

Merged
merged 9 commits into from
Sep 21, 2021
Merged

Enable new SQL generator on Mac #197

merged 9 commits into from
Sep 21, 2021

Conversation

Hoverbear
Copy link
Contributor

We whoops'd in #165 and the PR didn't quite work as expected on Mac!

This PR fixes it by using Mac specific flags as determined by @eeeebbbbrrrr .

@Hoverbear Hoverbear self-assigned this Sep 20, 2021
Signed-off-by: Ana Hobden <[email protected]>
@eeeebbbbrrrr
Copy link
Contributor

a cargo pgx install on the strings example worked fine on my Mac, however, a release build failed:

$ cargo pgx install --release
building extension with features `pg12`
"cargo" "build" "--release" "--features" "pg12" "--no-default-features"
   Compiling libc v0.2.102
   Compiling autocfg v1.0.1
   Compiling proc-macro2 v1.0.28
   Compiling syn v1.0.76
   Compiling unicode-xid v0.2.2
   Compiling version_check v0.9.3
   Compiling cfg-if v1.0.0
   Compiling memchr v2.4.0
   Compiling serde_derive v1.0.130
   Compiling serde v1.0.130
   Compiling log v0.4.14
   Compiling lazy_static v1.4.0
   Compiling ryu v1.0.5
   Compiling serde_json v1.0.68
   Compiling getrandom v0.1.16
   Compiling crc32fast v1.2.1
   Compiling regex-syntax v0.6.25
   Compiling cc v1.0.69
   Compiling eyre v0.6.5
   Compiling once_cell v1.8.0
   Compiling tinyvec_macros v0.1.0
   Compiling matches v0.1.8
   Compiling pin-project-lite v0.2.7
   Compiling adler v1.0.2
   Compiling crossbeam-utils v0.8.5
   Compiling itoa v0.4.7
   Compiling percent-encoding v2.1.0
   Compiling radium v0.5.3
   Compiling smallvec v1.6.1
   Compiling ansi_term v0.12.1
   Compiling glob v0.3.0
   Compiling unicode-width v0.1.8
   Compiling ppv-lite86 v0.2.10
   Compiling crossbeam-epoch v0.9.5
   Compiling gimli v0.25.0
   Compiling byteorder v1.4.3
   Compiling vec_map v0.8.2
   Compiling tap v1.0.1
   Compiling scopeguard v1.1.0
   Compiling rustc-demangle v0.1.20
   Compiling funty v1.1.0
   Compiling ucd-trie v0.1.3
   Compiling strsim v0.8.0
   Compiling owo-colors v1.3.0
   Compiling typenum v1.13.0
   Compiling mime v0.3.16
   Compiling wyz v0.2.0
   Compiling rayon-core v1.9.1
   Compiling bitflags v1.3.2
   Compiling ansi_term v0.11.0
   Compiling indenter v0.3.3
   Compiling xml-rs v0.8.4
   Compiling httpdate v0.3.2
   Compiling base64 v0.11.0
   Compiling humantime v2.1.0
   Compiling bindgen v0.59.1
   Compiling unescape v0.1.0
   Compiling termcolor v1.1.2
   Compiling proc-macro-hack v0.5.19
   Compiling shlex v1.0.0
   Compiling lazycell v1.3.0
   Compiling rustc-hash v1.1.0
   Compiling either v1.6.1
   Compiling peeking_take_while v0.1.2
   Compiling const_fn v0.4.8
   Compiling hashbrown v0.11.2
   Compiling heapless v0.6.1
   Compiling stable_deref_trait v1.2.0
   Compiling half v1.7.1
   Compiling fixedbitset v0.2.0
   Compiling seahash v4.1.0
   Compiling libloading v0.7.0
   Compiling tracing-core v0.1.18
   Compiling sharded-slab v0.1.3
   Compiling tinyvec v1.3.1
   Compiling unicode-bidi v0.3.5
   Compiling thread_local v1.1.3
   Compiling unicase v2.6.0
   Compiling nom v6.1.2
   Compiling standback v0.2.17
   Compiling generic-array v0.14.4
   Compiling time v0.2.27
   Compiling num-traits v0.2.14
   Compiling num-integer v0.1.44
   Compiling miniz_oxide v0.4.4
   Compiling memoffset v0.6.4
   Compiling rayon v1.5.1
   Compiling indexmap v1.7.0
   Compiling form_urlencoded v1.0.1
   Compiling textwrap v0.11.0
   Compiling build-deps v0.1.4
   Compiling pest v2.1.3
   Compiling clang-sys v1.2.0
   Compiling backtrace v0.3.61
   Compiling hash32 v0.1.1
   Compiling regex-automata v0.1.10
   Compiling addr2line v0.16.0
   Compiling unicode-normalization v0.1.19
   Compiling tracing-log v0.1.2
   Compiling aho-corasick v0.7.18
   Compiling object v0.26.0
   Compiling semver-parser v0.10.2
   Compiling matchers v0.0.1
   Compiling atty v0.2.14
   Compiling socks v0.3.3
   Compiling dirs-sys v0.3.6
   Compiling getrandom v0.2.3
   Compiling quote v1.0.9
   Compiling num_cpus v1.13.0
   Compiling which v3.1.1
   Compiling crossbeam-channel v0.5.1
   Compiling bitvec v0.19.5
   Compiling generic-array v0.13.3
   Compiling generic-array v0.12.4
   Compiling rand_core v0.5.1
   Compiling clap v2.33.3
   Compiling colored v2.0.0
   Compiling dirs v3.0.2
   Compiling idna v0.2.3
   Compiling regex v1.5.4
   Compiling semver v0.11.0
   Compiling uuid v0.8.2
   Compiling mime_guess v2.0.3
   Compiling flate2 v1.0.20
   Compiling petgraph v0.5.1
   Compiling rand_chacha v0.2.2
   Compiling as-slice v0.1.5
   Compiling rustc_version v0.3.3
   Compiling url v2.2.2
   Compiling env_logger v0.8.4
   Compiling crossbeam-deque v0.8.1
   Compiling chrono v0.4.19
   Compiling rand v0.7.3
   Compiling atomic-traits v0.3.0
   Compiling env_proxy v0.4.1
   Compiling cexpr v0.5.0
   Compiling rttp_client v0.1.0
   Compiling tracing-attributes v0.1.15
   Compiling thiserror-impl v1.0.26
   Compiling time-macros-impl v0.1.2
   Compiling enum-primitive-derive v0.2.1
   Compiling thiserror v1.0.26
   Compiling tracing v0.1.26
   Compiling time-macros v0.1.1
   Compiling tracing-serde v0.1.2
   Compiling serde-xml-rs v0.5.1
   Compiling toml v0.5.8
   Compiling serde_cbor v0.11.2
   Compiling tracing-subscriber v0.2.20
   Compiling proc-macro-crate v1.0.0
   Compiling tracing-error v0.1.2
   Compiling color-spantrace v0.1.6
   Compiling color-eyre v0.5.11
   Compiling pgx-utils v0.1.22 (/Users/e_ridge/_work/pgx/pgx-utils)
   Compiling pgx-pg-sys v0.1.22 (/Users/e_ridge/_work/pgx/pgx-pg-sys)
   Compiling pgx-macros v0.1.22 (/Users/e_ridge/_work/pgx/pgx-macros)
   Compiling pgx v0.1.22 (/Users/e_ridge/_work/pgx/pgx)
   Compiling strings v0.1.0 (/Users/e_ridge/_work/pgx/pgx-examples/strings)
    Finished release [optimized] target(s) in 2m 04s

installing extension
     Copying control file to `/Users/zdb/pg12/share/postgresql/extension/strings.control`
     Copying shared library to `/Users/zdb/pg12/lib/postgresql/strings.so`
    Building SQL generator with features `pg12`
"cargo" "build" "--bin" "sql-generator" "--release" "--features" "pg12" "--no-default-features"
   Compiling strings v0.1.0 (/Users/e_ridge/_work/pgx/pgx-examples/strings)
    Finished release [optimized] target(s) in 1.97s
 Discovering SQL entities
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', cargo-pgx/src/commands/install.rs:151:6
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

It doesn't say which file is missing, so it's a little tough to debug...

- for MacOS, the `-exported_symbols_list` doesn't want `=` to set its argument
@Hoverbear
Copy link
Contributor Author

@zombodb Thanks!!! We fixed this together! :) Could you confirm this works in debug and releas eon Mac now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants