Thank you Wes - that worked - I have updated the sample repo, should the 
question come up again.

> On Aug 17, 2020, at 2:06 PM, Wes McKinney <wesmck...@gmail.com> wrote:
> 
> OK. I understand the problem now. You need to add an imported static
> library for libarrow_bundled_dependencies.a and include that when
> linking.
> 
> On Mon, Aug 17, 2020 at 12:47 PM Radu Teodorescu
> <radukay...@yahoo.com.invalid> wrote:
>> 
>> ok - here is a simple illustration of my challenges building with arrow 
>> flight: https://github.com/raduteo/hello_flight 
>> <https://github.com/raduteo/hello_flight>
>> 
>> The above actually works fine on mac but fails on linux with a number of 
>> dependency failures (at first in ares and absl but they keep on evolving to 
>> other sub dependencies as they get resolved).
>> Also it’s worth pointing that a vanilla arrow project (a project that only 
>> needs arrow library) works fine using this model.
>> 
>> Absent some obvious fix (I am certainly no CMake guru), my intention is to 
>> keep on adding the dependecy path for all the libraries that are needed, but 
>> apart from the ugliness of it all that solution makes static assumption 
>> about what is available locally and what is build on the fly by arrow hence 
>> it’s not very portable.
>> 
>> My theory (and again, given my CMake expertise I may be wrong), that we are 
>> hitting an intrinsic ExternalProject limitation, in that there is no good 
>> way to pass dependency information (or any cmake variable) to the outer 
>> scope. I find add_subdirectory approach would be more versatile, but I am 
>> open to other community member’s suggestions.
>> 
>> 
>> 
>> 
>>> On Aug 14, 2020, at 8:59 AM, Wes McKinney <wesmck...@gmail.com> wrote:
>>> 
>>> Using ExternalProject should work as well (again, if it doesn't, it's a bug
>>> and should be reported). We should augment our examples to include an
>>> example use with ExternalProject
>>> 
>>> https://issues.apache.org/jira/browse/ARROW-9740
>>> 
>>> On Thu, Aug 13, 2020 at 9:44 PM Radu Teodorescu
>>> <radukay...@yahoo.com.invalid> wrote:
>>> 
>>>> Hi Wes,
>>>> 
>>>> I will certainly give that a shot and provide feedback - my typical setup
>>>> with arrow has so far used ExternalProject and I tend to prefer this for
>>>> development vs the install path since it makes it easier track problems,
>>>> step into the code, run arrow examples and tests when I need a quick usage
>>>> sample etc.
>>>> 
>>>> So if possible I would like to stick to that or one of the other cmake
>>>> options for including the arrow source into a project
>>>> 
>>>> 
>>>> 
>>>>> On Aug 13, 2020, at 7:27 PM, Wes McKinney <wesmck...@gmail.com> wrote:
>>>> 
>>>>> 
>>>> 
>>>>> hi Radu,
>>>> 
>>>>> 
>>>> 
>>>>> If you use the approach in
>>>> 
>>>>> 
>>>> 
>>>>> https://github.com/apache/arrow/blob/master/cpp/examples/minimal_build
>>>> 
>>>>> 
>>>> 
>>>>> It should be sufficient to use
>>>> 
>>>>> 
>>>> 
>>>>> find_package(ArrowFlight REQUIRED)
>>>> 
>>>>> 
>>>> 
>>>>> and then use the imported arrow_flight_static target (or
>>>> 
>>>>> arrow_flight_shared, depending on your needs) when linking. If that
>>>> 
>>>>> does not work, it's a bug and you should open a JIRA issue. We just
>>>> 
>>>>> worked a bunch on this for 1.0.0 and after so it's important that this
>>>> 
>>>>> work consistently.
>>>> 
>>>>> 
>>>> 
>>>>>> On Thu, Aug 13, 2020 at 4:20 PM Radu Teodorescu
>>>> 
>>>>>> <radukay...@yahoo.com.invalid> wrote:
>>>> 
>>>>>> 
>>>> 
>>>>>> I can produce something isolated shortly  - but really the questions is
>>>> how can one build a hello world type flight server that does something like
>>>> 
>>>>>> {
>>>> 
>>>>>> FlightServerBase server;
>>>> 
>>>>>> server.Serve();
>>>> 
>>>>>> //Yes I know this would fail at runtime but I just need to get there
>>>> first
>>>> 
>>>>>> }
>>>> 
>>>>>> 
>>>> 
>>>>>> with a fully self contained CMake project (i.e. that doesn’t depend on
>>>> having arrow or it’s dependencies preinstalled).
>>>> 
>>>>>> 
>>>> 
>>>>>> If you have something like that that works, I can take it from there
>>>> 
>>>>>> Thank you
>>>> 
>>>>>> Radu
>>>> 
>>>>>> 
>>>> 
>>>>>>>> On Aug 13, 2020, at 4:42 PM, Sutou Kouhei <k...@clear-code.com> wrote:
>>>> 
>>>>>>> 
>>>> 
>>>>>>> Hi,
>>>> 
>>>>>>> 
>>>> 
>>>>>>> Could you share a minimal CMake and C++ file set to
>>>> 
>>>>>>> reproduce your case?
>>>> 
>>>>>>> 
>>>> 
>>>>>>> 
>>>> 
>>>>>>> Thanks,
>>>> 
>>>>>>> --
>>>> 
>>>>>>> kou
>>>> 
>>>>>>> 
>>>> 
>>>>>>> In <f4a132f3-e8d5-468b-924d-93fe165d2...@yahoo.com>
>>>> 
>>>>>>> "Building an executable with arrow flight (C++)" on Thu, 13 Aug 2020
>>>> 12:06:49 -0400,
>>>> 
>>>>>>> Radu Teodorescu <radukay...@yahoo.com.INVALID> wrote:
>>>> 
>>>>>>> 
>>>> 
>>>>>>>> Hello,
>>>> 
>>>>>>>> I am trying to build a server that uses arrow flight and getting into
>>>> a bit of a rabbit hole with dependency inclusion.
>>>> 
>>>>>>>> I have arrow included as an external project and so far everything
>>>> has worked really smoothly (I have executables building with arrow, parquet
>>>> arrow and I also have arrow flight libraty building fine).
>>>> 
>>>>>>>> When I try to build an executable that user flight lib, I am getting
>>>> a never-ending stream of missing dependencies (mostly grpc related).
>>>> 
>>>>>>>> The flight-test-server is building without any issues but I cannot
>>>> see a clean way to point my cmake to the same list of dependencies that are
>>>> built internally by arrow CMake stack (without duplicating a lot of the
>>>> existing arrow CMake and/or manually defining all the dependencies)
>>>> 
>>>>>>>> 
>>>> 
>>>>>>>> I realize this is mostly a gRPC and CMake question, but I am hoping
>>>> someone had walked this road before or there is some public domain project
>>>> I can use as an integration reference.
>>>> 
>>>>>>>> Thank you
>>>> 
>>>>>>>> Radu
>>>> 
>>>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>> 

Reply via email to