Hi,

Thanks for responding.  Attached are the files & below are the steps I took
to build & run it.  Hopefully my issue can be spotted.

   1. Downloaded & installed arrow-cpp 9.0.0 using miniconda
   2. Added *C:\Users\<username>\Miniconda3\Library\bin* to path.  (or else
   it complains arrow.dll is not found)
   3. Downloaded *arrow *source code & switched to the *maint-9.0.0*
   branch  (to get hold of the  *conda_env_cpp.txt*)
   4. Launched Visual Studio 2019 x64 Developer tools command prompt
   5. Created a new conda environment using conda_env_cpp.txt
   from maint-9.0.0 branch:    *conda create -y -n arrow-9-test
   --file=C:\Repos\arrow\ci\conda_env_cpp.txt*
   6. Activated the new environment
   7. Navigated to miminal_build source folder
   8. Ran:  *cmake -G "Visual Studio 16 2019" CMakeLists.txt.  *It ran
   successfully as below
   -- Selecting Windows SDK version 10.0.19041.0 to target Windows
   10.0.19044.
   -- The C compiler identification is MSVC 19.29.30143.0
   -- The CXX compiler identification is MSVC 19.29.30143.0
   -- Detecting C compiler ABI info
   -- Detecting C compiler ABI info - done
   -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual
   Studio/2019/Professional/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe -
   skipped
   -- Detecting C compile features
   -- Detecting C compile features - done
   -- Detecting CXX compiler ABI info
   -- Detecting CXX compiler ABI info - done
   -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft
   Visual
   Studio/2019/Professional/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe -
   skipped
   -- Detecting CXX compile features
   -- Detecting CXX compile features - done
   -- Arrow version: 9.0.0
   -- Arrow SO version: 900.0.0
   -- Configuring done
   -- Generating done
   -- Build files have been written to: C:/Temp/arrow/minimal_build
   9. Ran: *cmake --build .  *It ran successfully as below
   Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
   Copyright (C) Microsoft Corporation. All rights reserved.

     Checking Build System
     Building Custom Rule C:/Temp/arrow/minimal_build/CMakeLists.txt
     example.cc
     arrow-example.vcxproj ->
   C:\Temp\arrow\minimal_build\Debug\arrow-example.exe
     Building Custom Rule C:/Temp/arrow/minimal_build/CMakeLists.txt
   10. Placed test.csv in the Debug folder
   11. Ran: Debug\arrow-example.exe.  Failed as below.
   (arrow-9-test) c:\Temp\arrow\minimal_build>Debug\arrow-example.exe
   * Reading CSV file
   'C:\Repos\arrow\cpp\examples\minimal_build\Debug\test.csv' into table
                                ☺  ♫▼║♫ ┤  ═!©☺L═!T

Regards
Prasad


On Mon, Nov 7, 2022 at 2:06 AM Weston Pace <[email protected]> wrote:

> That's pretty odd.  Are you able to share a full copy of your test program?
>
> On Sun, Nov 6, 2022 at 3:46 AM Raghavendra Prasad <[email protected]>
> wrote:
> >
> > Hi,
> >
> > Thanks for the quick reply.   res.status().ToString() results in an
> access violation:
> >
> > Exception thrown at 0x00007FF68F936C3C in arrow-example.exe: 0xC0000005:
> Access violation reading location 0xFFFFFFFFFFFFFFFF.
> >
> > Regards
> > Prasad
> >
> >
> > On Mon, Nov 7, 2022 at 12:43 AM Weston Pace <[email protected]>
> wrote:
> >>
> >> Can you try res.status().ToString() ?
> >>
> >> On Sun, Nov 6, 2022, 5:31 AM Raghavendra Prasad <[email protected]>
> wrote:
> >>>
> >>> Hi,
> >>>
> >>> Hope you are all well!
> >>>
> >>> I am struggling to get the minimal sample app to work & am hoping for
> tips to move forward
> >>>
> >>> Setup: Windows 10, Visual Studio 2019, Arrow 9.0.0 installed via
> miniconda.
> >>>
> >>> Thanks to the previous tip, I can now successfully build the arrow
> minimal_build example.   However when I try to run the sample it always
> fails at the arrow::io::ReadableFile::Open(csv_filename) step.   My code
> snippet is below & trying to debug, the returned status code does not seem
> useful.  Appreciate any guidance to understand what is wrong.
> >>>
> >>>   const char* csv_filename =
> "C:\\Repos\\arrow\\cpp\\examples\\minimal_build\\Debug\\test.csv";
> >>>   auto res = arrow::io::ReadableFile::Open(csv_filename);  // full
> path to existing file
> >>>   if (!res.ok()) {
> >>>     std::cout << res.status().IsIOError();  // returns 0
> >>>     std::cout << res.status().IsUnknownError();      // returns 0
> >>>     std::cout << res.status().detail();     // returns 000000
> >>>     std::cout << res.status().CodeAsString();   // causes app to crash
> with access violation
> >>>     std::cout << res.status().message(); // returns gibberish
> >>>   }
> >>>
> >>> Regards
> >>> Prasad
> >>>
> >>>
> >>> On Fri, Nov 4, 2022 at 7:06 PM Raghavendra Prasad <[email protected]>
> wrote:
> >>>>
> >>>> Thank you and have a great weekend
> >>>>
> >>>> On Fri, 4 Nov 2022 at 6:25 pm Sutou Kouhei <[email protected]>
> wrote:
> >>>>>
> >>>>> Hi,
> >>>>>
> >>>>> > Just wondering if you know when arrow-cpp v10.0.0 packages will be
> >>>>> > available via conda mechanism?
> >>>>>
> >>>>> This is work in progress. Please watch this pull request:
> >>>>> https://github.com/conda-forge/arrow-cpp-feedstock/pull/866
> >>>>>
> >>>>>
> >>>>> Thanks,
> >>>>> --
> >>>>> kou
> >>>>>
> >>>>> In <CA+203qVaHcOpTxDF=
> [email protected]>
> >>>>>   "Re: [C++] [Windows] Building arrow minimal build sample on
> Windows" on Fri, 4 Nov 2022 18:14:01 +1100,
> >>>>>   Raghavendra Prasad <[email protected]> wrote:
> >>>>>
> >>>>> > Hi kou,
> >>>>> >
> >>>>> > Thanks for the quick reply, that seems to have worked & I can
> build fine
> >>>>> > now!   I have run into other issues, but at least I can progress
> now.
> >>>>> >
> >>>>> > Just wondering if you know when arrow-cpp v10.0.0 packages will be
> >>>>> > available via conda mechanism?
> >>>>> >
> >>>>> > Regards
> >>>>> > Prasad
> >>>>> >
> >>>>> >
> >>>>> > On Fri, Nov 4, 2022 at 3:43 PM Sutou Kouhei <[email protected]>
> wrote:
> >>>>> >
> >>>>> >> Hi,
> >>>>> >>
> >>>>> >> Could you use "arrow_shared" instead of
> >>>>> >> "Arrow::arrow_shared" instead? "Arrow::arrow_shared" is
> >>>>> >> available since Apache Arrow 10.0.0.
> >>>>> >>
> >>>>> >> FYI: "arrow_shared" is still available with Apache Arrow
> >>>>> >> 10.0.0 to keep backward compatibility.
> >>>>> >>
> >>>>> >>
> >>>>> >> Thanks,
> >>>>> >> --
> >>>>> >> kou
> >>>>> >>
> >>>>> >> In <
> ca+203qvpmgltghzz9jrusb3hng81gabnz_52-6_8s48satn...@mail.gmail.com>
> >>>>> >>   "[C++] [Windows] Building arrow minimal build sample on
> Windows" on Fri,
> >>>>> >> 4 Nov 2022 09:03:44 +1100,
> >>>>> >>   Raghavendra Prasad <[email protected]> wrote:
> >>>>> >>
> >>>>> >> > Hello everyone,
> >>>>> >> >
> >>>>> >> > I am exploring usage of Apache Arrow specifically usage form
> Visual
> >>>>> >> Studio
> >>>>> >> > (VS2019) compiled C++ programs on my Windows 10 machine.
> >>>>> >> >
> >>>>> >> > I have Visual Studio 2019 installed already.   I wanted to
> simply use
> >>>>> >> pre-build
> >>>>> >> > binaries, so I installed Arrow 9.0.0 using miniconda:  conda
> install
> >>>>> >> > arrow-cpp=9.0.* -c conda-forge.  (9.0.0 was the latest package
> I can find
> >>>>> >> > there).   The install was successful.
> >>>>> >> >
> >>>>> >> > I now wanted to build the arrow minimal_build example & am
> failing at
> >>>>> >> multiple
> >>>>> >> > attempts.  Will gratefully accept any guidance to get this
> working!
> >>>>> >> >
> >>>>> >> > C:\Repos\arrow\cpp\examples\minimal_build> cmake CMakeLists.txt
> >>>>> >> > which immediately failed with:
> >>>>> >> >
> >>>>> >> > C:\Repos\arrow\cpp\examples\minimal_build>cmake CMakeLists.txt
> >>>>> >> > -- Selecting Windows SDK version 10.0.19041.0 to target Windows
> >>>>> >> 10.0.19044.
> >>>>> >> > -- Arrow version: 9.0.0
> >>>>> >> > -- Arrow SO version: 900.0.0
> >>>>> >> > -- Configuring done
> >>>>> >> > CMake Error at CMakeLists.txt:40 (add_executable):
> >>>>> >> >   Target "arrow-example" links to target "Arrow::arrow_shared"
> but the
> >>>>> >> target
> >>>>> >> >   was not found.  Perhaps a find_package() call is missing for
> an
> >>>>> >> IMPORTED
> >>>>> >> >   target, or an ALIAS target is missing?
> >>>>> >> >
> >>>>> >> > I next activated arrow-dev as per Developing on Windows & ran
> the same
> >>>>> >> command.
> >>>>> >> >
> >>>>> >> > conda create -y -n arrow-dev --file=ci\conda_env_cpp.txt  ==>
> successful
> >>>>> >> > conda activate arrow-dev ==> successful
> >>>>> >> > (arrow-dev) C:\Repos\arrow\cpp\examples\minimal_build>cmake
> >>>>> >> cmakelists.txt  ==>
> >>>>> >> > failed
> >>>>> >> > -- Selecting Windows SDK version 10.0.19041.0 to target Windows
> >>>>> >> 10.0.19044.
> >>>>> >> > -- The C compiler identification is MSVC 19.29.30143.0
> >>>>> >> > -- The CXX compiler identification is MSVC 19.29.30143.0
> >>>>> >> > -- Detecting C compiler ABI info
> >>>>> >> > -- Detecting C compiler ABI info - done
> >>>>> >> > -- Check for working C compiler: C:/Program Files
> (x86)/Microsoft Visual
> >>>>> >> >
> >>>>> >>
> Studio/2019/Professional/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe -
> >>>>> >> > skipped
> >>>>> >> > -- Detecting C compile features
> >>>>> >> > -- Detecting C compile features - done
> >>>>> >> > -- Detecting CXX compiler ABI info
> >>>>> >> > -- Detecting CXX compiler ABI info - done
> >>>>> >> > -- Check for working CXX compiler: C:/Program Files
> (x86)/Microsoft
> >>>>> >> Visual
> >>>>> >> >
> >>>>> >>
> Studio/2019/Professional/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe -
> >>>>> >> > skipped
> >>>>> >> > -- Detecting CXX compile features
> >>>>> >> > -- Detecting CXX compile features - done
> >>>>> >> > -- Arrow version: 9.0.0
> >>>>> >> > -- Arrow SO version: 900.0.0
> >>>>> >> > -- Configuring done
> >>>>> >> > CMake Error at CMakeLists.txt:43 (target_link_libraries):
> >>>>> >> >   Target "arrow-example" links to:
> >>>>> >> >
> >>>>> >> >     Arrow::arrow_shared
> >>>>> >> >
> >>>>> >> >   but the target was not found.  Possible reasons include:
> >>>>> >> >
> >>>>> >> >     * There is a typo in the target name.
> >>>>> >> >     * A find_package call is missing for an IMPORTED target.
> >>>>> >> >     * An ALIAS target is missing.
> >>>>> >> >
> >>>>> >> > Regards
> >>>>> >> > Prasad
> >>>>> >>
> >>>>
> >>>> --
> >>>> Regards
> >>>> Prasad
>

<<attachment: minimal_build.zip>>

Reply via email to