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

Error compiling flexible_jobshop.cc from VS2017 binary #709

Closed
aldeo opened this issue May 30, 2018 · 6 comments
Closed

Error compiling flexible_jobshop.cc from VS2017 binary #709

aldeo opened this issue May 30, 2018 · 6 comments
Assignees
Labels
Projects
Milestone

Comments

@aldeo
Copy link

aldeo commented May 30, 2018

Hi,
I downloaded the or-tools binary for VS2017 from https://github.com/google/or-tools/releases/download/v6.7.1/or-tools_VisualStudio2017-64bit_v6.7.4973.zip and got the following error while compiling the examples:

examples\cpp\flexible_jobshop.cc(228): error C2039: 'Join': is not a member of 'strings'
include\ortools/base/stringpiece_utils.h(21): note: see declaration of 'strings'
examples\cpp\flexible_jobshop.cc(227): error C3861: 'Join': identifier not found
make: *** [objs\\flexible_jobshop.obj] Error 2

Steps to reproduce:

  • Open x64 Native Tools Command Prompt for VS 2017
  • Go to directory where .zip file was extracted
  • Run "make all"

How I fixed it locally:

  • Open file ""..\examples\cpp\flexible_jobshop.cc""
  • Add header file: #include "ortools/base/join.h"
  • Replace string::Join -> absl::StrJoin in line 229

This fixes the compilation issue but I wonder whether it is the right way to do it.

@Mizux Mizux added Bug OS: Windows Windows OS labels May 30, 2018
@Mizux Mizux added this to To do in Kanban v6.8 via automation May 30, 2018
@Mizux Mizux added this to the v6.8 milestone May 30, 2018
@Mizux Mizux self-assigned this May 30, 2018
@lperron
Copy link
Collaborator

lperron commented May 30, 2018 via email

@lperron
Copy link
Collaborator

lperron commented May 30, 2018 via email

@Mizux Mizux closed this as completed Jun 1, 2018
Kanban v6.8 automation moved this from To do to Done Jun 1, 2018
@Mizux Mizux reopened this Jun 1, 2018
Kanban v6.8 automation moved this from Done to In progress Jun 1, 2018
@Mizux
Copy link
Collaborator

Mizux commented Jun 1, 2018

I've created a 6.7.x branch I'll backport the patch 023bc19 and recreate an archive on windows will be tagged "v6.7.2"

note: I'll use it to fix also the mac pip archive cf #681

@Mizux Mizux modified the milestones: v6.8, v6.7 Jun 1, 2018
@jkornblum
Copy link

Sounds like this error may be fixed already but not merged into master but FYI

I'm also getting this same error building my docker container from tiangolo/uwsgi-nginx-flask:python3.6 which is built from debian:sid. After make all my exact error is

examples/cpp/flexible_jobshop.cc: In function void operations_research::FlexibleJobshop(const operations_research::FlexibleJobShopData&):
examples/cpp/flexible_jobshop.cc:228:20: error: ‘Join’ is not a member of ‘strings’
                 << strings::Join(collector->ForwardSequence(0, seq), ", ");

My full Dockerfile is this for reference

FROM tiangolo/uwsgi-nginx-flask:python3.6

RUN set -ex; \
	apt-get update; \
	apt-get install -y --no-install-recommends \
		build-essential;

COPY or-tools_Debian-9.3-64bit_v6.7.4973.tar.gz /opt

RUN cd /opt; \
    tar -zxf /opt/or-tools_Debian-9.3-64bit_v6.7.4973.tar.gz; \
    rm /opt/or-tools_Debian-9.3-64bit_v6.7.4973.tar.gz; \
    mv /opt/or-tools_Debian-9.3-64bit_v6.7.4973 /opt/google-or-tools; \    
    cd /opt/google-or-tools; \
    make all; \
    python -m pip install --upgrade ortools; \
    python -m pip show ortools;

ENV STATIC_INDEX 1

COPY ./app /app

@Mizux
Copy link
Collaborator

Mizux commented Jun 2, 2018

In fact it's already fix on master (for 6.8) but not backported to branch 6.7.x (just created).

Waiting for CI to pass them hope to release new package or-tools_Debian-9.3-64bit_v6.7.4978.tar.gz on Monday, tag will be v6.7.2

note: python ortools is standalone, i.e. contains all needed libs -> no need of the tar.gz for python usage

@jkornblum
Copy link

Haha, yes that is clear as day in the documentation now that I read it again 😄

Cheers.

@Mizux Mizux closed this as completed Jun 4, 2018
Kanban v6.8 automation moved this from In progress to Done Jun 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Kanban v6.8
  
Done
Development

No branches or pull requests

4 participants