[ 
https://issues.apache.org/jira/browse/THRIFT-1826?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Roger Meier resolved THRIFT-1826.
---------------------------------

    Resolution: Fixed
      Assignee: Roger Meier

Thanks Simon!
                
> Library, generated files use incorrect path for Thrift headers
> --------------------------------------------------------------
>
>                 Key: THRIFT-1826
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1826
>             Project: Thrift
>          Issue Type: Bug
>          Components: C glib - Compiler, C glib - Library
>    Affects Versions: 0.9
>         Environment: CentOS 6.3 on x86 (32-bit)
>            Reporter: Simon South
>            Assignee: Roger Meier
>            Priority: Minor
>         Attachments: thrift-1826-update-c_glib-source-header-paths.patch
>
>
> By default Thrift's header files for C+GLib are installed beneath 
> /usr/local/include/thrift/c_glib. However, both files generated by Thrift's 
> compiler and Thrift's own (library) header files seem to assume these are 
> available at /usr/local/include/thrift.
> Consequently, by default generated files fail to compile, e.g.:
> $ make
> gcc -g -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -c -o 
> main.o main.c
> In file included from gen-c_glib/hello_world.h:10,
>                  from main.c:4:
> gen-c_glib/hello_world_types.h:12:34: error: thrift/thrift_struct.h: No such 
> file or directory
> gen-c_glib/hello_world_types.h:13:45: error: 
> thrift/protocol/thrift_protocol.h: No such file or directory
> These files would actually be found at "thrift/c_glib/thrift_struct.h" and 
> "thrift/c_glib/protocol/thrift_protocol.h".
> The easy workaround is to create a symbolic link, i.e.:
> $ cd /usr/local/include/thrift/c_glib
> $ ln -s . thrift
> and then add "/usr/local/include/thrift/c_glib" to the compiler's search 
> path. But it seems to me a better solution would be to
> 1. Change the path of the installed header files, perhaps storing them in 
> "/usr/local/include/thrift/c_glib/thrift", which would at least remove the 
> need for the symbol link;
> 2. Update the library and the generator to use the correct path in #include 
> statements; or
> 3. Have the installer create a symbolic link automatically.
> If there is consensus on the correct fix (I vote for the second) I can spend 
> the time to implement it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to