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

Initial Fedora packaging #1

Merged
merged 1 commit into from
May 30, 2018
Merged

Conversation

M4rtinK
Copy link
Contributor

@M4rtinK M4rtinK commented May 28, 2018

NOTE: currently fails to build due to some weird protocol buffer issues

Changes from Sailfish OS packaging:

  • rebased to 2.6.0
  • libzmq-devel is called zeromq-devel on Fedora
  • libzmq is called zeromq on Fedora
  • added Python devel BuildRequires
  • added boost-python2-devel BuildRequires (looks like Valhalla
    needs Python 2 version of this during build ?)
  • added lua-devel BuildRequires
  • added sqlite-devel BuildRequires
  • added geos-devel BuildRequires
  • added libspatialite-devel BuildRequires
  • added some glibc packages as build-requires in a vain
    attempt to fix the protocol buffer issues during build
  • fixed the %setup line
  • disabled a Fedora Python 2 deprecation check for now
    (Valhalla apparently uses unversioned Python shebang somewhere
    in its scripts)
  • removed redundant %files section

@M4rtinK
Copy link
Contributor Author

M4rtinK commented May 28, 2018

The errors in question during build:

configure: creating ./config.status
config.status: creating Makefile
config.status: creating libvalhalla.pc
config.status: creating valhalla/valhalla.h
config.status: creating valhalla/config.h
config.status: executing depfiles commands
config.status: executing libtool commands
+ /usr/bin/make -j2
mkdir -p /builddir/build/BUILD/valhalla-2.6.0/genfiles && cd /builddir/build/BUILD/valhalla-2.6.0 && xxd -i -s +$(head -n 1 date_time/zonespec.csv | wc -c | xargs) date_time/zonespec.csv > /builddir/build/BUILD/valhalla-2.6.0/genfiles/date_time_zonespec.h
mkdir -p /builddir/build/BUILD/valhalla-2.6.0/genfiles && cd /builddir/build/BUILD/valhalla-2.6.0 && xxd -i lua/graph.lua > /builddir/build/BUILD/valhalla-2.6.0/genfiles/graph_lua_proc.h
mkdir -p /builddir/build/BUILD/valhalla-2.6.0/genfiles && cd /builddir/build/BUILD/valhalla-2.6.0 && xxd -i lua/admin.lua > /builddir/build/BUILD/valhalla-2.6.0/genfiles/admin_lua_proc.h
mkdir -p /builddir/build/BUILD/valhalla-2.6.0/genfiles && cd /builddir/build/BUILD/valhalla-2.6.0/locales && ./make_locales.sh *.json > /builddir/build/BUILD/valhalla-2.6.0/genfiles/locales.h
 PROTOC tripcommon.proto
[libprotobuf WARNING google/protobuf/compiler/parser.cc:546] No syntax specified for the proto file: tripcommon.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)
 PROTOC trippath.proto
[libprotobuf WARNING google/protobuf/compiler/parser.cc:546] No syntax specified for the proto file: trippath.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)
[libprotobuf WARNING google/protobuf/compiler/parser.cc:546] No syntax specified for the proto file: tripcommon.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)
 PROTOC directions_options.proto
[libprotobuf WARNING google/protobuf/compiler/parser.cc:546] No syntax specified for the proto file: directions_options.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)
[libprotobuf WARNING google/protobuf/compiler/parser.cc:546] No syntax specified for the proto file: tripcommon.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)
 PROTOC tripdirections.proto
[libprotobuf WARNING google/protobuf/compiler/parser.cc:546] No syntax specified for the proto file: tripdirections.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)
[libprotobuf WARNING google/protobuf/compiler/parser.cc:546] No syntax specified for the proto file: tripcommon.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)
 PROTOC route.proto
[libprotobuf WARNING google/protobuf/compiler/parser.cc:546] No syntax specified for the proto file: route.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)
 PROTOC navigator.proto
[libprotobuf WARNING google/protobuf/compiler/parser.cc:546] No syntax specified for the proto file: navigator.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)
 PROTOC osmformat.proto
proto/osmformat.proto: No such file or directory
make: *** [Makefile:11012: src/proto/osmformat.pb.cc] Error 1
make: *** Waiting for unfinished jobs....
[error] character map file `UTF-8' not found: No such file or directory
[error] default character map file `ANSI_X3.4-1968' not found: No such file or directory
make: [Makefile:10980: genfiles/locales.h] Error 4 (ignored)
error: Bad exit status from /var/tmp/rpm-tmp.O2vA2n (%build)
    Bad exit status from /var/tmp/rpm-tmp.O2vA2n (%build)

Happened during this build in COPR:
https://copr.fedorainfracloud.org/coprs/m4rtink/osm-scout-server/build/759611/
The excerpt is from this log file:
https://copr-be.cloud.fedoraproject.org/results/m4rtink/osm-scout-server/fedora-rawhide-x86_64/00759611-valhalla/builder-live.log

Similar error happens when I try to do a build locally using mock.

Googling for the error messages I have found this Gist:
https://gist.github.com/TimRepke/f13bbb74f34d4c97d10742601a4a0406
But the proposed fix does no work - configuration fails due to c++ 11 not being available.

As for why using 2.6.0 - I've tried also tried 2.4.8 and 2.5.0 and got the same error for both.

If using 2.6.0 would be a problem for OSM Scout Server I can certainly package an older version. :)

@rinigus
Copy link
Owner

rinigus commented May 28, 2018

2.6.0: this shouldn't be a problem, so go ahead.

proto/osmformat.proto is a symlink to OSM-binary/src/osmformat.proto, which is submodule. So, we would need to clone it with submodules to resolve it. Alternative, I think, is to disable data tools, as I did for SFOS. However, it would probably be nice to have them available on Fedora.

Let's try to fix the build before merging? :) [although, I have to go to sleep now]

@M4rtinK
Copy link
Contributor Author

M4rtinK commented May 28, 2018

2.6.0: this shouldn't be a problem, so go ahead.

OK. :)

proto/osmformat.proto is a symlink to OSM-binary/src/osmformat.proto, which is submodule. So, we would need to clone it with submodules to resolve it. Alternative, I think, is to disable data tools, as I did for SFOS. However, it would probably be nice to have them available on Fedora.

So that basically means their release tarball from GitHub is broken. :) I'll try to create a proper one myself then. :)

Let's try to fix the build before merging? :) [although, I have to go to sleep now]

Definitely no pressure, this can certainly wait a day or two. :)

Changes from Sailfish OS packaging:
- rebased to 2.6.0
- libzmq-devel is called zeromq-devel on Fedora
- libzmq is called zeromq on Fedora
- added Python devel BuildRequires
- added boost-python2-devel BuildRequires (looks like Valhalla
  needs Python 2 version of this during build ?)
- added lua-devel BuildRequires
- added sqlite-devel BuildRequires
- added geos-devel BuildRequires
- added libspatialite-devel BuildRequires
- added some glibc packages as build-requires in a vain
  attempt to fix the protocol buffer issues during build
- fixed the %setup line
- disabled a Fedora Python 2 deprecation check for now
  (Valhalla apparently uses unversioned Python shebang somewhere
   in its scripts)
- removed redundant %files section
- disabled debug package generation for now (causes build to fail)
- disabled the Python 2 only bindings, asked upstream about Python 3
  plans[0]
- removed static lib from %files (we build as a dynamic lib on Fedora)

Note about the tarball: the tarball generated by GitHub does not
contain submodules, so a custom tarball with appropriate tools[1] needs
to be generated.

[0] valhalla/valhalla#1325
[1] https://github.com/meitar/git-archive-all.sh
@M4rtinK
Copy link
Contributor Author

M4rtinK commented May 29, 2018

I've updated the PR:

  • dropped the Python 2 only bindings for now (looks like Python 3 support is possible with the new cmake based build system)
  • disabled debug package generation for now (same build-breaking issue as with prime_server, will have to investigate later)
  • dropped the static lib from %files section

With these changes and the fixed tarball that includes submodules Valhalla finally builds locally in mock and hopefully should build in COPR as well (running at the moment):
https://copr.fedorainfracloud.org/coprs/m4rtink/osm-scout-server/build/760288/

I've also reported the broken tarballs upstream: valhalla/valhalla#1324

It's pretty crazy that GitHub does not include submodules in tarballs (given how often those are used) and that even git itself still does not support (AFAIK) directly creating archives that include submodules.

@rinigus rinigus merged commit 6419042 into rinigus:master May 30, 2018
@rinigus
Copy link
Owner

rinigus commented May 30, 2018

Excellent, it seems that CORP is fine as well!

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.

None yet

2 participants