GithubHelp home page GithubHelp logo

Comments (74)

suljaxm avatar suljaxm commented on June 15, 2024 60

install IO2D

sudo apt update
sudo apt install build-essential
sudo apt install cmake
sudo apt install libcairo2-dev
sudo apt install libgraphicsmagick1-dev
sudo apt install libpng-dev

git clone --recurse-submodules https://github.com/cpp-io2d/P0267_RefImpl
cd P0267_RefImpl
mkdir Debug
cd Debug
cmake --config Debug "-DCMAKE_BUILD_TYPE=Debug" ..
cmake --build .
sudo make install

from cppnd-route-planning-project.

rwxdash avatar rwxdash commented on June 15, 2024 27

An update, if anyone sees this. Issue resolved by following the steps here, https://github.com/cpp-io2d/P0267_RefImpl/blob/master/BUILDING.md

Make sure to do this first, https://github.com/cpp-io2d/P0267_RefImpl/blob/master/BUILDING.md#xcode-and-libc

A small trick is to edit the CMakeLists.txt under P0267_RefImpl and comment out the part with samples. Then, using CoreGraphics/Mac on macOS run "ALL_Build" and "install" in XCode.

Thanks to Benjamin H. in our classroom for the detail explanation.

from cppnd-route-planning-project.

Shivam-Bhardwaj avatar Shivam-Bhardwaj commented on June 15, 2024 14

After
cmake --build . during installation of IO2D
add
sudo make install

this will copy the necessary files at places where Cmake can find them.

from cppnd-route-planning-project.

mylescallan avatar mylescallan commented on June 15, 2024 12

I am using a mac and got it up and running locally yesterday.

I documented the steps here if that is any use to anyone.

Next step, get it up and running in Xcode so that I can see what the OSM data looks like when loaded. Wish me luck!

from cppnd-route-planning-project.

harrisrobin avatar harrisrobin commented on June 15, 2024 5

I still run into this and have not managed to get past it. None of the workarounds here work.

I'm on macOS Catalina (version 10.15.4).

from cppnd-route-planning-project.

bander-saeed94 avatar bander-saeed94 commented on June 15, 2024 3

@aoozdemir
Please open the issue since it is not yet resolved.

from cppnd-route-planning-project.

ssvaddiparthy avatar ssvaddiparthy commented on June 15, 2024 3

Hello Anyone from the future: Here is a detailed wiki for fixing the same:
https://t.co/CljjTK2aws?amp=1

from cppnd-route-planning-project.

Banacial avatar Banacial commented on June 15, 2024 3

So what now about solving this on Windows ?
I don't know at all what i should do now, as of now i do not even know whether this magical io2d thing is P0267_Reflmpl by any chance. I went through the installation guidline outlined in BUILDING.md but cannot make sense of the General Notes (just followed the Cairo/win32 ) and am now stuck on the ususal:

Could not find a package configuration file provided by "io2d" with any of
the following names:

io2dConfig.cmake
io2d-config.cmake 

error. Additionally i dont know how to make sense of this instruction:

I kind of got it running in windows.. vcpkg can install io2d, it compiles the other libraries as x86 and then used CMAKE_PREFIX_TOOLCHAIN to point to the vcpkg cmake script.. it created a MSVC project.. but I think that is not what they expect... was not able to build io2d myself such that CMake finds it

or this:

I installed the io2d through the vcpkg and used the following command so that it is identified by cmake.
cmake -DCMAKE_TOOLCHAIN_FILE=path to buildsystems\vcpkg.cmake ..

since doesn't seem to exist.

from cppnd-route-planning-project.

rwxdash avatar rwxdash commented on June 15, 2024 2

An update, if anyone sees this. Issue resolved by following the steps here, https://github.com/cpp-io2d/P0267_RefImpl/blob/master/BUILDING.md
Make sure to do this first, https://github.com/cpp-io2d/P0267_RefImpl/blob/master/BUILDING.md#xcode-and-libc
A small trick is to edit the CMakeLists.txt under P0267_RefImpl and comment out the part with samples. Then, using CoreGraphics/Mac on macOS run "ALL_Build" and "install" in XCode.
Thanks to Benjamin H. in our classroom for the detail explanation.

"comment out the part with samples", this means what? Can you give more details. Thank you

If I recall correctly, I meant this.
under P0267_RefImpl comment out the part with samples
https://github.com/cpp-io2d/P0267_RefImpl/blob/master/CMakeLists.txt#L38-L40

from cppnd-route-planning-project.

toaderandrei avatar toaderandrei commented on June 15, 2024 2

An update, if anyone sees this. Issue resolved by following the steps here, https://github.com/cpp-io2d/P0267_RefImpl/blob/master/BUILDING.md
Make sure to do this first, https://github.com/cpp-io2d/P0267_RefImpl/blob/master/BUILDING.md#xcode-and-libc
A small trick is to edit the CMakeLists.txt under P0267_RefImpl and comment out the part with samples. Then, using CoreGraphics/Mac on macOS run "ALL_Build" and "install" in XCode.
Thanks to Benjamin H. in our classroom for the detail explanation.

"comment out the part with samples", this means what? Can you give more details. Thank you

If I recall correctly, I meant this.
under P0267_RefImpl comment out the part with samples
https://github.com/cpp-io2d/P0267_RefImpl/blob/master/CMakeLists.txt#L38-L40

For one that does not have enough exp in working with cmake/make building this thing it is not easy. I think a bit more help and documentation is required.

from cppnd-route-planning-project.

yyccphus avatar yyccphus commented on June 15, 2024 2

install IO2D

sudo apt update
sudo apt install build-essential
sudo apt install cmake
sudo apt install libcairo2-dev
sudo apt install libgraphicsmagick1-dev
sudo apt install libpng-dev

git clone --recurse-submodules https://github.com/cpp-io2d/P0267_RefImpl
cd P0267_RefImpl
mkdir Debug
cd Debug
cmake --config Debug "-DCMAKE_BUILD_TYPE=Debug" ..
cmake --build .
sudo make install

"cmake --config Debug "-DCMAKE_BUILD_TYPE=Debug" .. " seems doesn't work, since it tells me "CMake Error: Unknown argument --config"

from cppnd-route-planning-project.

pbdevpros avatar pbdevpros commented on June 15, 2024 1

I agree. I am having the same issues, after trying to build the project. There's little documentation listed with the CppND-Route-Planning-Project on how to build the project.

I managed to get around the io2d cmake build problem by following the above instructions and then using a load of hacky workarounds, but now I cannot run make as the io2d headers can't be found. It would be helpful to have more guidance here.

from cppnd-route-planning-project.

z1yuan avatar z1yuan commented on June 15, 2024 1

I just met the exactly the same error on my ubuntu.

Could not find a package configuration file provided by "io2d" with any of
the following names:

io2dConfig.cmake
io2d-config.cmake

and after some experiments i find out that it is because the CMake find_package will not be able to find "io2d". So just we need to git clone io2d into /opt/c++ for example, and follow the install instruction. After this everything goes well in my case.

from cppnd-route-planning-project.

ChangZhu1997 avatar ChangZhu1997 commented on June 15, 2024 1

After
cmake --build . during installation of IO2D
add
sudo make install

this will copy the necessary files at places where Cmake can find them.

This is a solution for Ubuntu Linux. I have successfully tried it.

from cppnd-route-planning-project.

nishinkvasu avatar nishinkvasu commented on June 15, 2024 1

Anyone got it to work on windows?

from cppnd-route-planning-project.

jesselee34 avatar jesselee34 commented on June 15, 2024 1

Also trying to get it working on windows.

from cppnd-route-planning-project.

kaipomauli avatar kaipomauli commented on June 15, 2024 1

Wow, what a journey to get the test and empty project build locally on my Windows machine. But that's why we are taking this course right, to learn about those kind of headaches and come away stronger! :P
So for those having the issue in windows, after building the io2d in visual studio, build the "install" project.
The neccessary library and include files will be saved in C/Program Files x86/io2d.
Inside the library folder, there will be cmake files which you can refer to when asked for the io2d directory in CMake.
However, the installation of IO2D with CMake is messy and keeps the same names and target folder for debug and release libraries. I wanted both so I built with each configuration successively then moved into release and debug folders. I then modified the .cmake config files to refer to the new structure.
Please find attached my new install structure I use in my successfully built project.
The next issue I encountered was the fact that my gtest_main was being built statically while the rest of the project is built dynamically. You need to set the option 'gtest_force_shared_crt' or something option ON in CMAKE, then the test can be built without an issue.
Now the real programming fun start
io2d.zip
s!

from cppnd-route-planning-project.

PatrickGono avatar PatrickGono commented on June 15, 2024 1

I managed to finally get it running* on windows.

  1. Install vcpkg and the required packaged as per the instructions here
  2. To install io2d, follow the rest of the instructions, but instead of the listed command:
    cmake -G "Visual Studio 15 2017 Win64" --config Debug "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" ../.
    you should run:
    cmake.exe -G "Visual Studio 17 2022" "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_TOOLCHAIN_FILE=C:\tools\vcpkg\scripts\buildsystems\vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" "-DCHARSET_LIB=C:\tools\vcpkg\installed\x64-windows\debug\lib\charset.lib" "-DEXPAT_LIB=C:\tools\vcpkg\packages\expat_x64-windows\debug\lib\libexpat.lib" "-DICONV_LIB=C:\tools\vcpkg\installed\x64-windows\debug\lib\iconv.lib" ../. (i.e. remove --config Debug and manually set paths to the relevant packages).
  3. This should create a io2d.sln file in the current folder. Open it with Visual Studio with admin privileges (if your Program Files (x86) folder is protected), and select Build->Build solution
  4. Once built, rightlick on the INSTALL project in the solution explorer (in the side panel, usually), and click Build.
  5. You should now have an io2d folder in your Program Files (x86).
  6. Go to the CppND-Route-Planning-Project folder, create a Build folder, enter it.
  7. Run
    cmake ../. -DCMAKE_TOOLCHAIN_FILE=C:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DPKG_CONFIG_EXECUTABLE=C:/tools/vcpkg/packages/pkgconf_x64-windows/tools/pkgconf/pkgconf.exe -DCAIRO_LIBRARIES=C:/tools/vcpkg/installed/x64-windows/lib -DGRAPHICSMAGICK_LIBRARIES=C:/tools/vcpkg/installed/x64-windows/lib -DCAIRO_INCLUDE_DIRS=C:/tools/vcpkg/installed/x64-windows/include/cairo -DGRAPHICSMAGICK_INCLUDE_DIRS=C:/tools/vcpkg/installed/x64-windows/include/magick
  8. Open the built OSM_A_star_search.sln file in Visual Studio. When you build this project, it should fail with code-relevant errors, such as functions not returning the specified value
  9. *For me it didn't (still missing some path to a lib), so I gave up, and decided to finish this one in the web workspace udacity provides

from cppnd-route-planning-project.

jiankang1991 avatar jiankang1991 commented on June 15, 2024

@aoozdemir Hi I also meet such problem in Ubuntu. After I built the P0267_RefImpl, what else should I do to let io2d be found? Should I change something in the CMAKE file of CppND-Route-Planning-Project?

from cppnd-route-planning-project.

rwxdash avatar rwxdash commented on June 15, 2024

@karlTUM hi! I didn't change anything in the CMAKE of this project. But, perhaps after this build, https://github.com/cpp-io2d/P0267_RefImpl/blob/master/BUILDING.md#cairoxlib-on-linux, you can try to run make in the folder where cmake built the io2d.

I'm not sure how to install on ubuntu I'm afraid.

from cppnd-route-planning-project.

jiankang1991 avatar jiankang1991 commented on June 15, 2024

@aoozdemir Thank you. I installed P0267_RefImpl as root and it worked. But I have come across anoterh problem:

CMake Error at test/CMakeLists.txt:25 (add_executable):
  add_executable called with incorrect number of arguments


CMake Error at test/CMakeLists.txt:28 (target_link_libraries):
  Cannot specify link libraries for target "test" which is not built by this
  project.


-- Configuring incomplete, errors occurred!
See also "/home/kang/Documents/cpp/cpp_eng/CppND-Route-Planning-Project/build/CMakeFiles/CMakeOutput.log".

Did you have this problem?

from cppnd-route-planning-project.

rwxdash avatar rwxdash commented on June 15, 2024

@karlTUM nice. I didn't get this error, no. Perhaps, ask in the classroom too. It's possible someone already came across to this.

from cppnd-route-planning-project.

adreena avatar adreena commented on June 15, 2024

I'm trying to follow the instructions what's the next step after opening io2d.xcodeproj? my Xcode throws error on this library "cstddef"

from cppnd-route-planning-project.

Horki avatar Horki commented on June 15, 2024

Any solution for arch linux, besides VM

from cppnd-route-planning-project.

lakshman64 avatar lakshman64 commented on June 15, 2024

from cppnd-route-planning-project.

bander-saeed94 avatar bander-saeed94 commented on June 15, 2024

This issue should not be closed. I am trying to setup with an ubuntu container after trying with my mac.
The short solution to upload a Docker image for the project. I am trying but this whole week with no success.

from cppnd-route-planning-project.

baoqger avatar baoqger commented on June 15, 2024

I am using windows system. If a docker image for this project is provided, it will be great.

from cppnd-route-planning-project.

baoqger avatar baoqger commented on June 15, 2024

@aoozdemir Hi I also meet such problem in Ubuntu. After I built the P0267_RefImpl, what else should I do to let io2d be found? Should I change something in the CMAKE file of CppND-Route-Planning-Project?

I used a ubuntu docker image, but fail to build. Can you share more information? Or just follow the doc working for you.

from cppnd-route-planning-project.

baoqger avatar baoqger commented on June 15, 2024

An update, if anyone sees this. Issue resolved by following the steps here, https://github.com/cpp-io2d/P0267_RefImpl/blob/master/BUILDING.md

Make sure to do this first, https://github.com/cpp-io2d/P0267_RefImpl/blob/master/BUILDING.md#xcode-and-libc

A small trick is to edit the CMakeLists.txt under P0267_RefImpl and comment out the part with samples. Then, using CoreGraphics/Mac on macOS run "ALL_Build" and "install" in XCode.

Thanks to Benjamin H. in our classroom for the detail explanation.

"comment out the part with samples", this means what? Can you give more details. Thank you

from cppnd-route-planning-project.

AGistinger avatar AGistinger commented on June 15, 2024

Does anyone have a workaround for windows I am also getting the errors where IO2D is missing header files and cannot be found within the project?

from cppnd-route-planning-project.

AbdSam94 avatar AbdSam94 commented on June 15, 2024

I'm having a hard time building CppND-Route-Planning-Project as it can't find the IO2dconfig.cmake files.
I tried to add the command make install after the build (in the debug directory) but apperently it didn't find a makefile.

from cppnd-route-planning-project.

AbdSam94 avatar AbdSam94 commented on June 15, 2024

unfortunately I'm working on wndiows

from cppnd-route-planning-project.

ChangZhu1997 avatar ChangZhu1997 commented on June 15, 2024

unfortunately I'm working on wndiows

Why use windows such a broken OS, come to use Linux :)

from cppnd-route-planning-project.

AbdSam94 avatar AbdSam94 commented on June 15, 2024

unfortunately I'm working on wndiows

Why use windows such a broken OS, come to use Linux :)

I will eventually ;)

from cppnd-route-planning-project.

Horki avatar Horki commented on June 15, 2024

Hello Anyone from the future: Here is a detailed wiki for fixing the same:
https://t.co/CljjTK2aws?amp=1

Nice post, you could also install GTest and pugiXML via Conan
Also you could see my solution

from cppnd-route-planning-project.

ssvaddiparthy avatar ssvaddiparthy commented on June 15, 2024

@Horki thanks for introducing Conan to me. I did not hear of it till now. Will surely take a look.

from cppnd-route-planning-project.

baoqger avatar baoqger commented on June 15, 2024

install IO2D

sudo apt update
sudo apt install build-essential
sudo apt install cmake
sudo apt install libcairo2-dev
sudo apt install libgraphicsmagick1-dev
sudo apt install libpng-dev

git clone --recurse-submodules https://github.com/cpp-io2d/P0267_RefImpl
cd P0267_RefImpl
mkdir Debug
cd Debug
cmake --config Debug "-DCMAKE_BUILD_TYPE=Debug" ..
cmake --build .
sudo make install

"sudo make install" can install the io2d into the system, right? Then cmake of main project can find it.

from cppnd-route-planning-project.

baoqger avatar baoqger commented on June 15, 2024

Hello Anyone from the future: Here is a detailed wiki for fixing the same:
https://t.co/CljjTK2aws?amp=1

I also read this post. But I don't understand how it can allow cmake find the io2d package. can you add more explanation? After I build the io2d library. how to do that? In this post, it just mentioned "10. Open the io2d.xcodeproj file in XCode and run the same." how it works?

from cppnd-route-planning-project.

ssvaddiparthy avatar ssvaddiparthy commented on June 15, 2024

@baoqger where have you placed the io2d builds? cmake is able to find the io2d project for me fine.

from cppnd-route-planning-project.

rwxdash avatar rwxdash commented on June 15, 2024

I'm closing this issue, as it'll probably never close and has become a source of distracting notifications that could be discussed in the Udacity classroom with your mentors or your classmates.

The solutions that are already posted here will most likely solve your problem. You may continue to have the conversation here, I'm just tired of this issue being raised from inactivity every now and then.

All the best.

from cppnd-route-planning-project.

harrisrobin avatar harrisrobin commented on June 15, 2024

@aoozdemir I know this is closed, but just to avoid more people getting confused the solutions posted here do not solve the issue for Mac users. Udacity mentors have acknowledged this and from what I understood are working on a fix to the instructions.

from cppnd-route-planning-project.

hemulens avatar hemulens commented on June 15, 2024

I just met the exactly the same error on my ubuntu.

Could not find a package configuration file provided by "io2d" with any of
the following names:

io2dConfig.cmake
io2d-config.cmake

and after some experiments i find out that it is because the CMake find_package will not be able to find "io2d". So just we need to git clone io2d into /opt/c++ for example, and follow the install instruction. After this everything goes well in my case.

Hello! Could you please explain where you found "/opt/c++"?

from cppnd-route-planning-project.

Toulik-Das avatar Toulik-Das commented on June 15, 2024

CMake script expects cairo and graphicsmagick to be installed. libpng is required in order to run tests. These installation steps assume APT package manager on Ubuntu Linux. Installation steps:

Refresh apt: sudo apt update
Install GCC: sudo apt install build-essential
Install CMake: sudo apt install cmake
Install Cairo: sudo apt install libcairo2-dev
Install graphicsmagick: sudo apt install libgraphicsmagick1-dev
Install libpng: sudo apt install libpng-dev
Example of CMake execution:

git clone --recurse-submodules https://github.com/cpp-io2d/P0267_RefImpl
cd P0267_RefImpl
mkdir Debug
cd Debug
cmake --config Debug "-DCMAKE_BUILD_TYPE=Debug" ..
cmake --build .

from cppnd-route-planning-project.

ridwan102 avatar ridwan102 commented on June 15, 2024

I am using a mac and got it up and running locally yesterday.

I documented the steps here if that is any use to anyone.

Next step, get it up and running in Xcode so that I can see what the OSM data looks like when loaded. Wish me luck!

Thanks so much! This worked like a charm. The instructions were exceptional with visuals

from cppnd-route-planning-project.

Ishaanyp avatar Ishaanyp commented on June 15, 2024

cmake --build .

Hi thanks for your comment, it worked until i run above command @suljaxm.

But above command didn't work. It threw following error:

/Users/ishan/Documents/github/cpp/CppND-Route-Planning-Project/thirdparty/P0267_RefImpl/P0267_RefImpl/P0267_RefImpl/xio2d.h:4:10:

fatal error:
'limits' file not found
#include
^~~~~~~~
1 error generated.

Any idea how that header seems to be missing? Thanks.

from cppnd-route-planning-project.

nishinkvasu avatar nishinkvasu commented on June 15, 2024

Also trying to get it working on windows.

I kind of got it running in windows.. vcpkg can install io2d, it compiles the other libraries as x86 and then used CMAKE_PREFIX_TOOLCHAIN to point to the vcpkg cmake script.. it created a MSVC project.. but I think that is not what they expect... was not able to build io2d myself such that CMake finds it

from cppnd-route-planning-project.

jesselee34 avatar jesselee34 commented on June 15, 2024

So I tried this approach but when I run cmake it dies at the io2dConfig.cmake saying Could not find a package configuration file provided by "unofficial-cairo"

Did you run into this?

from cppnd-route-planning-project.

nishinkvasu avatar nishinkvasu commented on June 15, 2024

Sorry for the late reply.. I think I did face something similar.. not sure when though.. the cmake goes thru with the following command.. -

cmake -DCMAKE_TOOLCHAIN_FILE=pathtovcpkg.cmake ..

from cppnd-route-planning-project.

azzamshaikh avatar azzamshaikh commented on June 15, 2024

hello @jesselee34, @nishinkvasu

I am having issues with the 'could not find package' on windows as well. i haven't really found a solution. Any luck on this?

from cppnd-route-planning-project.

nishinkvasu avatar nishinkvasu commented on June 15, 2024

Hi @azzamshaikh ,

I installed the io2d through the vcpkg and used the following command so that it is identified by cmake.
cmake -DCMAKE_TOOLCHAIN_FILE=path to buildsystems\vcpkg.cmake ..

Was able to create a MSVC project this way.

from cppnd-route-planning-project.

PavanproJack avatar PavanproJack commented on June 15, 2024

I am using a mac and got it up and running locally yesterday.

I documented the steps here if that is any use to anyone.

Next step, get it up and running in Xcode so that I can see what the OSM data looks like when loaded. Wish me luck!

Many Thanks. This helped a lot saving my time. Perfect documentation in fact.

from cppnd-route-planning-project.

SchneiderJs avatar SchneiderJs commented on June 15, 2024

After
cmake --build . during installation of IO2D
add
sudo make install

this will copy the necessary files at places where Cmake can find them.

Thanks, that worked for me!

from cppnd-route-planning-project.

charity1475 avatar charity1475 commented on June 15, 2024

When i reach this step i get an error.
cmake --build .

            from /home/charity/UAD/P0267_RefImpl/P0267_RefImpl/Samples/svg/svg.cpp:5:

/home/charity/UAD/P0267_RefImpl/P0267_RefImpl/Samples/svg/external/svgpp/include/svgpp/policy/value_events.hpp:23:5: note: candidate expects 2 arguments, 3 provided
23 | context.set(tag, args...);
| ^~~~~~~
make[2]: *** [P0267_RefImpl/Samples/svg/CMakeFiles/svg.dir/build.make:76: P0267_RefImpl/Samples/svg/CMakeFiles/svg.dir/svg.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:677: P0267_RefImpl/Samples/svg/CMakeFiles/svg.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

from cppnd-route-planning-project.

charity1475 avatar charity1475 commented on June 15, 2024

I changed something and it worked for me
cmake --config Debug "-DCMAKE_BUILD_TYPE=Debug" ..
cmake ..
make
sudo make install

from cppnd-route-planning-project.

yyccphus avatar yyccphus commented on June 15, 2024

I changed something and it worked for me
cmake --config Debug "-DCMAKE_BUILD_TYPE=Debug" ..
cmake ..
make
sudo make install

Thanks, it worked for me, too.

from cppnd-route-planning-project.

timgrein avatar timgrein commented on June 15, 2024

install IO2D

sudo apt update
sudo apt install build-essential
sudo apt install cmake
sudo apt install libcairo2-dev
sudo apt install libgraphicsmagick1-dev
sudo apt install libpng-dev

git clone --recurse-submodules https://github.com/cpp-io2d/P0267_RefImpl
cd P0267_RefImpl
mkdir Debug
cd Debug
cmake --config Debug "-DCMAKE_BUILD_TYPE=Debug" ..
cmake --build .
sudo make install

I managed to get it working under windows with the following steps:

from cppnd-route-planning-project.

aaronespasa avatar aaronespasa commented on June 15, 2024

I have followed the steps of this tutorial: Readme for the installation of IO2d in MacOS

At the time of running the command ./OSM_A_star_search, I get the following error:
Assertion failed: (back_buffer_size.width >= 1. && back_buffer_size.height >= 1. && display_buffer_size.width >= 1. && display_buffer_size.height >= 1.), function _ScaledBackBufferRect, file /Users/aaron/Documents/github/CppND-Route-Planning-Project/thirdparty/P0267_RefImpl/P0267_RefImpl/P0267_RefImpl/coregraphics/xio2d_cg_display.cpp, line 9.

The line 9 of that file is:
assert(back_buffer_size.width >= 1. && back_buffer_size.height >= 1. && display_buffer_size.width >= 1. && display_buffer_size.height >= 1. );

And the problem is that both display_buffer_size.width and display_buffer_size.height are 1.

If I comment those lines, IO2D executes a blank window:
Screenshot 2021-05-27 at 12 25 32

I'm currently using macOS Big Sur with the chip M1.

from cppnd-route-planning-project.

tensory avatar tensory commented on June 15, 2024

I got IO2D installed on OSX using Xcode and MacPorts. I'm going to leave my environment variables here. Hope it helps someone.

Details:

  1. Name the variable CXXFLAGS, not CPPFLAGS
  2. The -nostdinc++ flag is from this part of the IO2D Readme.
  3. The -I/Applications/Xcode-12.4.app/... flag resolves a problem where Cmake cannot find X11 headers: 'X11/Xlib.h' file not found
    If you aren't getting that error, you might not need this flag. Note the -I before the path. That Xcode path is specific to my machine; your path will be different. Xcode is in Xcode.app/ unless you've renamed it. I got the idea from this GitHub issue.
  4. The -isystem/opt/X11/include and related flags are from IO2D Readme. See where they concatenated the flags to a prior $CXXFLAGS? I chose to put it all in one CXXFLAGS value.
  5. Don't forget to also define $LDFLAGS, also in the IO2D Readme.
~/Development/cppnano/P0267_RefImpl/Debug % echo $CXXFLAGS
-nostdinc++ -isystem/Users/ari.lacenski/Development/cppnano/RoutePlanningProject-Dependencies/clang+llvm-6.0.0-x86_64-apple-darwin/include/c++/v1 -I/Applications/Xcode-12.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11 -isystem/opt/X11/include -isystem/opt/local/include -isystem/usr/local/include

~/Development/cppnano/P0267_RefImpl/Debug % echo $LDFLAGS
-L/Users/ari.lacenski/Development/cppnano/RoutePlanningProject-Dependencies/clang+llvm-6.0.0-x86_64-apple-darwin/lib -Wl,-rpath,/Users/ari.lacenski/Development/cppnano/RoutePlanningProject-Dependencies/clang+llvm-6.0.0-x86_64-apple-darwin/lib

from cppnd-route-planning-project.

bhavikmk avatar bhavikmk commented on June 15, 2024

install IO2D

sudo apt update
sudo apt install build-essential
sudo apt install cmake
sudo apt install libcairo2-dev
sudo apt install libgraphicsmagick1-dev
sudo apt install libpng-dev

git clone --recurse-submodules https://github.com/cpp-io2d/P0267_RefImpl
cd P0267_RefImpl
mkdir Debug
cd Debug
cmake --config Debug "-DCMAKE_BUILD_TYPE=Debug" ..
cmake --build .

In which directory to clone ?

from cppnd-route-planning-project.

Rank-N-Tensor avatar Rank-N-Tensor commented on June 15, 2024

@bhavikkasundra55 did you install it in the cloned route planner folder or separately?

from cppnd-route-planning-project.

Rank-N-Tensor avatar Rank-N-Tensor commented on June 15, 2024

I changed something and it worked for me
cmake --config Debug "-DCMAKE_BUILD_TYPE=Debug" ..
cmake ..
make
sudo make install

@charity1475 , i tried this , make throws the same error again? do you have a workaround? also, did you install this in the route planner folder or separately?

from cppnd-route-planning-project.

bhavikmk avatar bhavikmk commented on June 15, 2024

@bhavikkasundra55 did you install it in the cloned route planner folder or separately?

I did it separately,
Did i have to clone io2D repository in cpp-route-planner directory?

from cppnd-route-planning-project.

Rank-N-Tensor avatar Rank-N-Tensor commented on June 15, 2024

No , you didn't. The issue on linux has to do with the version of the svgpp submodule. Check issue #136 for more information.

from cppnd-route-planning-project.

nstucki avatar nstucki commented on June 15, 2024

I have followed the steps of this tutorial: Readme for the installation of IO2d in MacOS

At the time of running the command ./OSM_A_star_search, I get the following error: Assertion failed: (back_buffer_size.width >= 1. && back_buffer_size.height >= 1. && display_buffer_size.width >= 1. && display_buffer_size.height >= 1.), function _ScaledBackBufferRect, file /Users/aaron/Documents/github/CppND-Route-Planning-Project/thirdparty/P0267_RefImpl/P0267_RefImpl/P0267_RefImpl/coregraphics/xio2d_cg_display.cpp, line 9.

The line 9 of that file is: assert(back_buffer_size.width >= 1. && back_buffer_size.height >= 1. && display_buffer_size.width >= 1. && display_buffer_size.height >= 1. );

And the problem is that both display_buffer_size.width and display_buffer_size.height are 1.

If I comment those lines, IO2D executes a blank window: Screenshot 2021-05-27 at 12 25 32

I'm currently using macOS Big Sur with the chip M1.

I encountered the same issue. Have you been able to solve it? @aaronespasa

from cppnd-route-planning-project.

Seim2k17 avatar Seim2k17 commented on June 15, 2024

something and

Hey charity1475 / yyccphus ,
what exactly did you change ?

from cppnd-route-planning-project.

Seim2k17 avatar Seim2k17 commented on June 15, 2024

i redid the whole process and it worked for me with the following steps:

  1. removed the whole local copy of the repository
    sudo rm -fr P0267_RefImpl/

  2. clone the repo again
    git clone --recurse-submodules https://github.com/cpp-io2d/P0267_RefImpl

  3. make debug dir
    mkdir Debug

  4. goto dir
    cd Debug

  5. i have cmake 3.2x and the --config option is no more available so i only did
    cmake ..

  6. then build the project
    cmake --build .

from cppnd-route-planning-project.

Seim2k17 avatar Seim2k17 commented on June 15, 2024

what confuses me and i didn't looked at it exactly - there are two repositories!

  1. the io2d library
  2. the routerplannerproject
    So after doing the stuff from my last command one still need to compile the project and then we have an executable.
    also see here carefully: https://gist.github.com/wAuner/68ee426b87d297340826660f5ac62b79

from cppnd-route-planning-project.

lederle avatar lederle commented on June 15, 2024

No , you didn't. The issue on linux has to do with the version of the svgpp submodule. Check issue #136 for more information.

I can confirm this, on Ubuntu 20.04 I had to update svgpp to the 1.3.0 tag in the svgpp submodule to get io2d to build. Issue #136 refers to the io2d issue where this was raised.

For some reason the HEAD in the svgpp submodule is detached at commit a33934a, which is prior to the v1.3.0 fix. Once you checkout the fix, io2d will build (assuming you were stuck on the svgpp issue).

Do:
cd P0267_RefImpl/P0267_RefImpl/Samples/svg/external/svgpp
git checkout tags/v1.3.0

You can git checkout master as well, it is a few commits ahead of v1.3.0.

from cppnd-route-planning-project.

Aadi775 avatar Aadi775 commented on June 15, 2024

Whenever i reach 66% in cmake .. i get these errors

/home/aadi/P0267_RefImpl/P0267_RefImpl/Samples/svg/svg.cpp:231:10: note: candidate expects 2 arguments, 3 provided make[2]: *** [P0267_RefImpl/Samples/svg/CMakeFiles/svg.dir/build.make:90: P0267_RefImpl/Samples/svg/CMakeFiles/svg.dir/svg.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:631: P0267_RefImpl/Samples/svg/CMakeFiles/svg.dir/all] Error 2 make: *** [Makefile:146: all] Error 2

from cppnd-route-planning-project.

jonna-t1 avatar jonna-t1 commented on June 15, 2024

Where do you clone io2d or does it not matter?
"clone --recurse-submodules https://github.com/cpp-io2d/P0267_RefImpl"

from cppnd-route-planning-project.

stevendae avatar stevendae commented on June 15, 2024

Commenting out Line 38 to 30 in the CMakeLists.txt file gets rid of the errors in installing the sample and lets you proceed with the rest of the build.

This is on Ubuntu 20.04.

from cppnd-route-planning-project.

Shyam-NR avatar Shyam-NR commented on June 15, 2024

Where do you clone io2d or does it not matter? "clone --recurse-submodules https://github.com/cpp-io2d/P0267_RefImpl"

Yeah it does matter and clone it into the third-party folder

from cppnd-route-planning-project.

akshaypatel774 avatar akshaypatel774 commented on June 15, 2024

I am using windows system. If a docker image for this project is provided, it will be great.

Did you get it working in windows or not?

from cppnd-route-planning-project.

felixhoernle avatar felixhoernle commented on June 15, 2024

I have followed the steps of this tutorial: Readme for the installation of IO2d in MacOS

At the time of running the command ./OSM_A_star_search, I get the following error: Assertion failed: (back_buffer_size.width >= 1. && back_buffer_size.height >= 1. && display_buffer_size.width >= 1. && display_buffer_size.height >= 1.), function _ScaledBackBufferRect, file /Users/aaron/Documents/github/CppND-Route-Planning-Project/thirdparty/P0267_RefImpl/P0267_RefImpl/P0267_RefImpl/coregraphics/xio2d_cg_display.cpp, line 9.

The line 9 of that file is: assert(back_buffer_size.width >= 1. && back_buffer_size.height >= 1. && display_buffer_size.width >= 1. && display_buffer_size.height >= 1. );

And the problem is that both display_buffer_size.width and display_buffer_size.height are 1.

If I comment those lines, IO2D executes a blank window: Screenshot 2021-05-27 at 12 25 32

I'm currently using macOS Big Sur with the chip M1.

I have the same issue using macOS Sonoma with M2 chip and not been able to solve it so far.

from cppnd-route-planning-project.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.