hove-io / transit_model

Managing transit data with Rust
GNU Affero General Public License v3.0
53 stars 28 forks source link

gtfs2netexfr installation issue #646

Closed jvanoost closed 4 years ago

jvanoost commented 4 years ago

Hi,

I'm a great newb with rust and cargo I followed the install procedure by install PROJ and then clang and libssl-dev => that's OK

I tried to install gtfs2netexfr and get this when I lauched the command

~/home/gtfs2netexfr$ cargo install gtfs2netexfr
    Updating crates.io index
error: could not find `gtfs2netexfr` in registry `https://github.com/rust-lang/crates.io-index`

how can I solve this ? Thanks

datanel commented 4 years ago

Hi,

I think there is a mistake in the Readme.

If you try cargo install --path . it should work

jvanoost commented 4 years ago

thanks, it is better !

But always error

~/transit_model/gtfs2netexfr$ cargo install --path .
  Installing gtfs2netexfr v1.0.0 (/home/moi/transit_model/gtfs2netexfr)
    Updating crates.io index
  Downloaded miniz_oxide v0.3.7
   Compiling miniz_oxide v0.3.7
   Compiling proj-sys v0.12.2
   Compiling flate2 v1.0.14
error: failed to run custom build command for `proj-sys v0.12.2`

Caused by:
  process didn't exit successfully: `/home/moi/transit_model/target/release/build/proj-sys-2f1ba67ed1119c14/build-script-build` (exit code: 101)
--- stdout
cargo:rustc-link-lib=proj
cargo:warning=couldn't execute `llvm-config --prefix` (error: No such file or directory (os error 2))
cargo:warning=set the LLVM_CONFIG_PATH environment variable to a valid `llvm-config` executable

--- stderr
wrapper.h:1:10: fatal error: 'proj.h' file not found
wrapper.h:1:10: fatal error: 'proj.h' file not found, err: true
thread 'main' panicked at 'Unable to generate bindings: ()', src/libcore/result.rs:1188:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

warning: build failed, waiting for other jobs to finish...
error: failed to compile `gtfs2netexfr v1.0.0 (/home/moi/transit_model/gtfs2netexfr)`, intermediate artifacts can be found at `/home/moi/transit_model/target`

Caused by:
  build failed

it seems PROJ has problem..

jvanoost commented 4 years ago

I've just installed llvm, which wasn't installed but still error

datanel commented 4 years ago

How have you installed proj? I install like that

sudo apt-get install -yq wget build-essential pkg-config sqlite3 libsqlite3-dev
wget https://github.com/OSGeo/proj.4/releases/download/6.3.0/proj-6.3.0.tar.gz
tar -xzf proj-6.3.0.tar.gz
cd proj-6.3.0 
./configure --prefix=/usr
make
sudo make install
jvanoost commented 4 years ago

oh yes !

How have you installed proj? I install like that

sudo apt-get install -yq wget build-essential pkg-config sqlite3 libsqlite3-dev
wget https://github.com/OSGeo/proj.4/releases/download/6.3.0/proj-6.3.0.tar.gz
tar -xzf proj-6.3.0.tar.gz
cd proj-6.3.0 
./configure --prefix=/usr
make
sudo make install

not this way to install proj make in progress...

datanel commented 4 years ago

@jvanoost is it good for you now?

jvanoost commented 4 years ago

not yet, but my fault

I made a mistake while wanted to add proj to the path. I'm on it to correct But all you give me is ok, so I'm pretty sure it will be ok ;) ##################### Edited : I had to my path the rep .cargo/bin It's ok ! I can launch the app it's OK, my network is in Netex

Thank you very much I launched it for the network of Lille

How is it possible to test it ?

datanel commented 4 years ago

sorry I'm not sure to understand well.

Your question is how to test the command with your GTFS Lille or how to test the netex produced ?

jvanoost commented 4 years ago

Sorry it wasn't clear the question was about testing the netex produced. I tried to zip and upload it on : http://appli.chouette.mobi/ but it got an error

datanel commented 4 years ago

I don't know what tool you can test with but you can test that the XML produced has a valid schema. see https://github.com/CanalTP/transit_model/blob/master/tests/write_netex_france.rs#L79

with xmllint xmllint --noout --nonet --huge --schema NeTEx_publication.xsd your_produced_netex

NetEx_publication.xsd coming from https://github.com/NeTEx-CEN/NeTEx/blob/348033a470ae7cfc50c57c911b0e786b52dd85bc/xsd/NeTEx_publication.xsd

jvanoost commented 4 years ago

Ok thanks a lot ! I close the issue !