GtkDoc error in cmake

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

GtkDoc error in cmake

Hiba Alfarsi
Hello ... I am working in project called "Libraqm" https://github.com/HOST-Oman/libraqm .. and I want to use GtkDoc packege for documentation..  I used this codes in CMakeLists.txt that is located in doc directory:
#find_package (GtkDoc REQUIRED)
#gtk_doc_add_module(
#      libraqm
#      SOURCE ${CMAKE_SOURCE_DIR}/src ${CMAKE_CURRENT_SOURCE_DIR}
#      XML ${CMAKE_SOURCE_DIR}/docs/raqm-docs.xml
#      LIBRARIES raqm
#)

#add_custom_target (doc ALL)



and it seems there is an error:
CFLAGS:  "-Itarget_include_dirs-NOTFOUND" "-I/usr/include/glib-2.0" "-I/usr/lib/x86_64-linux-gnu/glib-2.0/include"
/usr/bin/ld: cannot find -ltarget_link_libraries-NOTFOUND


My question is.. how i can solve this problem and what "-Itarget_include_dirs" means ?!!!



_______________________________________________
gtk-doc-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-doc-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GtkDoc error in cmake

Sam Thursfield
Hi Hiba

Firstly, the meaning of "target_include_dirs-NOTFOUND" is that CMake
tried to read a target property into the variable
'target_include_dirs', but the property was missing. So CMake set the
'target_include_dirs' variable to the string
"target_include_dirs-NOTFOUND". Same has happened with the
"target_link_libraries-NOTFOUND" error -- it means CMake tried to read
a property into the 'target_link_libraries' variable, but the property
wasn't set.

Where this actually happens is here:
https://git.gnome.org/browse/gtk-doc/tree/cmake/GtkDocConfig.cmake.in?id=64d940b45474c4e98c4ed9bb035248a40145527d#n319

and here:
https://git.gnome.org/browse/gtk-doc/tree/cmake/GtkDocConfig.cmake.in?id=64d940b45474c4e98c4ed9bb035248a40145527d#n336

It could well be that the code is just broken if the library for your
project doesn't link against any other libraries. I'll look into that.
However, looking at libraqm it seems to link against 3 libs (Freetype,
Harfbuzz and Fribidi).

Are you calling target_link_libraries() and target_include_dirs() at
all for the library you're documenting? If not, that explains why this
problem is occuring, but I think that things will break further down
because the gtkdoc-scanobj tool needs to actually compile and run a
program linked against your library, and so it needs to know all of
the dependencies.

If you can share your current CMakelists files for the library I can
try and reproduce the issue myself. I don't think the
GtkDocConfig.cmake module is widely used yet so it's quite likely that
you've found some kind of bug.

Sam

On 6/29/16, Hiba Alfarsi <[hidden email]> wrote:

> Hello ... I am working in project called "Libraqm"
> https://github.com/HOST-Oman/libraqm .. and I want to use GtkDoc packege
> for documentation..  I used this codes in CMakeLists.txt that is located in
> doc directory:
> #find_package (GtkDoc REQUIRED)
> #gtk_doc_add_module(
> #      libraqm
> #      SOURCE ${CMAKE_SOURCE_DIR}/src ${CMAKE_CURRENT_SOURCE_DIR}
> #      XML ${CMAKE_SOURCE_DIR}/docs/raqm-docs.xml
> #      LIBRARIES raqm
> #)
>
> #add_custom_target (doc ALL)
>
>
>
> and it seems there is an error:
> CFLAGS:  "-Itarget_include_dirs-NOTFOUND" "-I/usr/include/glib-2.0"
> "-I/usr/lib/x86_64-linux-gnu/glib-2.0/include"
> /usr/bin/ld: cannot find -ltarget_link_libraries-NOTFOUND
>
>
> My question is.. how i can solve this problem and what
> "-Itarget_include_dirs" means ?!!!
>
_______________________________________________
gtk-doc-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-doc-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GtkDoc error in cmake

Hiba Alfarsi
Dear Sam,

Thank you for your replay... I tried to fix the errors by following your feedbacks... You can find my code in this link https://github.com/alfarsi92/libraqm/blob/73b5985a08c2fbad7e63185b05b286cd9e3595bd/src/CMakeLists.txt (src/CMakeLists.txt)

When I run it another errors are shown up:
make[3]: *** [src/libraqm/html.stamp] Error 6
make[2]: *** [src/CMakeFiles/doc-libraqm.dir/all] Error 2
make[1]: *** [src/CMakeFiles/doc-libraqm.dir/rule] Error 2
make: *** [doc-libraqm] Error 2




could you guide me please where is the issue?!

Thank you 

On Wed, Jun 29, 2016 at 4:51 PM, Sam Thursfield <[hidden email]> wrote:
Hi Hiba

Firstly, the meaning of "target_include_dirs-NOTFOUND" is that CMake
tried to read a target property into the variable
'target_include_dirs', but the property was missing. So CMake set the
'target_include_dirs' variable to the string
"target_include_dirs-NOTFOUND". Same has happened with the
"target_link_libraries-NOTFOUND" error -- it means CMake tried to read
a property into the 'target_link_libraries' variable, but the property
wasn't set.

Where this actually happens is here:
https://git.gnome.org/browse/gtk-doc/tree/cmake/GtkDocConfig.cmake.in?id=64d940b45474c4e98c4ed9bb035248a40145527d#n319

and here:
https://git.gnome.org/browse/gtk-doc/tree/cmake/GtkDocConfig.cmake.in?id=64d940b45474c4e98c4ed9bb035248a40145527d#n336

It could well be that the code is just broken if the library for your
project doesn't link against any other libraries. I'll look into that.
However, looking at libraqm it seems to link against 3 libs (Freetype,
Harfbuzz and Fribidi).

Are you calling target_link_libraries() and target_include_dirs() at
all for the library you're documenting? If not, that explains why this
problem is occuring, but I think that things will break further down
because the gtkdoc-scanobj tool needs to actually compile and run a
program linked against your library, and so it needs to know all of
the dependencies.

If you can share your current CMakelists files for the library I can
try and reproduce the issue myself. I don't think the
GtkDocConfig.cmake module is widely used yet so it's quite likely that
you've found some kind of bug.

Sam

On 6/29/16, Hiba Alfarsi <[hidden email]> wrote:
> Hello ... I am working in project called "Libraqm"
> https://github.com/HOST-Oman/libraqm .. and I want to use GtkDoc packege
> for documentation..  I used this codes in CMakeLists.txt that is located in
> doc directory:
> #find_package (GtkDoc REQUIRED)
> #gtk_doc_add_module(
> #      libraqm
> #      SOURCE ${CMAKE_SOURCE_DIR}/src ${CMAKE_CURRENT_SOURCE_DIR}
> #      XML ${CMAKE_SOURCE_DIR}/docs/raqm-docs.xml
> #      LIBRARIES raqm
> #)
>
> #add_custom_target (doc ALL)
>
>
>
> and it seems there is an error:
> CFLAGS:  "-Itarget_include_dirs-NOTFOUND" "-I/usr/include/glib-2.0"
> "-I/usr/lib/x86_64-linux-gnu/glib-2.0/include"
> /usr/bin/ld: cannot find -ltarget_link_libraries-NOTFOUND
>
>
> My question is.. how i can solve this problem and what
> "-Itarget_include_dirs" means ?!!!
>


_______________________________________________
gtk-doc-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-doc-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GtkDoc error in cmake

Sam Thursfield
On 6/30/16, Hiba Alfarsi <[hidden email]> wrote:

> Thank you for your replay... I tried to fix the errors by following your
> feedbacks... You can find my code in this link
> https://github.com/alfarsi92/libraqm/blob/73b5985a08c2fbad7e63185b05b286cd9e3595bd/src/CMakeLists.txt
> (src/CMakeLists.txt)
>
> When I run it another errors are shown up:
> make[3]: *** [src/libraqm/html.stamp] Error 6
> make[2]: *** [src/CMakeFiles/doc-libraqm.dir/all] Error 2
> make[1]: *** [src/CMakeFiles/doc-libraqm.dir/rule] Error 2
> make: *** [doc-libraqm] Error 2

I'm glad you made progress. Could attach the full log to your email?
I'm hoping there's an actual error message further up, not just "error
6".

Sam
_______________________________________________
gtk-doc-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-doc-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GtkDoc error in cmake

Hiba Alfarsi
Good morning Sam

Did you able to solve the problem? or can you guide me to solve it  by myself ?!
I am waiting your reply

Hiba

On Fri, Jul 1, 2016 at 2:51 PM, Hiba Alfarsi <[hidden email]> wrote:
You will find in the attachment all files of the project

On Thu, Jun 30, 2016 at 3:55 PM, Sam Thursfield <[hidden email]> wrote:
On 6/30/16, Hiba Alfarsi <[hidden email]> wrote:
> Thank you for your replay... I tried to fix the errors by following your
> feedbacks... You can find my code in this link
> https://github.com/alfarsi92/libraqm/blob/73b5985a08c2fbad7e63185b05b286cd9e3595bd/src/CMakeLists.txt
> (src/CMakeLists.txt)
>
> When I run it another errors are shown up:
> make[3]: *** [src/libraqm/html.stamp] Error 6
> make[2]: *** [src/CMakeFiles/doc-libraqm.dir/all] Error 2
> make[1]: *** [src/CMakeFiles/doc-libraqm.dir/rule] Error 2
> make: *** [doc-libraqm] Error 2

I'm glad you made progress. Could attach the full log to your email?
I'm hoping there's an actual error message further up, not just "error
6".

Sam



_______________________________________________
gtk-doc-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-doc-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GtkDoc error in cmake

Stefan Sauer-4
Am 11.07.2016 um 06:43 schrieb Hiba Alfarsi:
> Good morning Sam
>
> Did you able to solve the problem? or can you guide me to solve it  by myself ?!
> I am waiting your reply

Sam asked you to attach the full log.

Stefan

>
> Hiba
>
> On Fri, Jul 1, 2016 at 2:51 PM, Hiba Alfarsi <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     You will find in the attachment all files of the project
>
>     On Thu, Jun 30, 2016 at 3:55 PM, Sam Thursfield <[hidden email]
>     <mailto:[hidden email]>> wrote:
>
>         On 6/30/16, Hiba Alfarsi <[hidden email]
>         <mailto:[hidden email]>> wrote:
>         > Thank you for your replay... I tried to fix the errors by following your
>         > feedbacks... You can find my code in this link
>         > https://github.com/alfarsi92/libraqm/blob/73b5985a08c2fbad7e63185b05b286cd9e3595bd/src/CMakeLists.txt
>         > (src/CMakeLists.txt)
>         >
>         > When I run it another errors are shown up:
>         > make[3]: *** [src/libraqm/html.stamp] Error 6
>         > make[2]: *** [src/CMakeFiles/doc-libraqm.dir/all] Error 2
>         > make[1]: *** [src/CMakeFiles/doc-libraqm.dir/rule] Error 2
>         > make: *** [doc-libraqm] Error 2
>
>         I'm glad you made progress. Could attach the full log to your email?
>         I'm hoping there's an actual error message further up, not just "error
>         6".
>
>         Sam
>
>
>
>
>
> _______________________________________________
> gtk-doc-list mailing list
> [hidden email]
> https://mail.gnome.org/mailman/listinfo/gtk-doc-list
>

_______________________________________________
gtk-doc-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-doc-list
Loading...