gst-plugins-bad: avtp: how to notify meson to use custom kernel header

John Rama john.rama01 at gmail.com
Tue Jul 14 21:25:19 UTC 2020


Hi Desouza

On 2020/07/14 16:44, Desouza, Ederson wrote:
> On Tue, 2020-07-14 at 15:28 -0400, John Rama wrote:
>> Hello, 
>>
> Hi,
> 
>> On 2020/07/13 19:32, Desouza, Ederson wrote:
>>> Hi,
>>>
>>> On Mon, 2020-07-13 at 16:45 -0400, John Rama wrote:
>>>> Hello expert                                                                                            
>>>>                                                                                                         
>>>> I'm now trying to evalute avtp plugin of gst-plugins-bad, however I can not                             
>>>> build avtp plugin successfully because meson can not find "strut sock_txtime"                           
>>>> in "linux/net_tstamp.h" of my system.                                                                   
>>>>                                                                                                         
>>>> I'm using the custom build kernel of 4.19.0 and it's headers are installed at                           
>>>> /usr/src/linux-headers-4.19.0                                                                           
>>>>                                                                                                         
>>>> Question is how can I tell meson to look for /usr/src/linux-headers-4.19.0 ?? 
>>>>                                                                                                         
>>>> Really appreciated your help !!
>>>>
>>>> ============================================================                                                                
>>>>                                                                                                         
>>>> # What I tried                                                                                          
>>>>   I tried followings, but meson can not detect "strut sock_txtime" in "linux/net_tstamp.h".             
>>>>   1. export C_INCLUDE_PATH="/usr/src/linux-headers-4.19.0"                                        
>>>>      to add /usr/src/linux-headers-4.19.0 for default search path.                                
>>>>       $cc -E  -v -                                                                                      
>>>>         ...                                                                                             
>>>>         #include <...> search starts here:                                                              
>>>>        /usr/src/linux-headers-4.19.0                                                              
>>>>        /usr/lib/gcc/x86_64-linux-gnu/6/include                                                          
>>>>        /usr/local/include                                                                               
>>>>        /usr/lib/gcc/x86_64-linux-gnu/6/include-fixed                                                    
>>>>        /usr/include/x86_64-linux-gnu                                                                    
>>>>        /usr/include                                                                                     
>>>>       End of search list.                                                                               
>>>>   2.  add following line in gst-plugins-bad/ext/avtp/meson.build                                        
>>>>       include_directories('/usr/src/linux-headers-4.19.0/')                                       
>>>>                                                                                                         
>>>> # environment                                                                                           
>>>>   I'm using master of gst-build. 
>>>>                                                
>>>>   the version of meson and ninja is as following.                                                       
>>>>   $meson --version                                                                                      
>>>>   0.53.1                                                                                                
>>>>   $ ninja --version                                                                                     
>>>>   17.7.2                                                                                                
>>>>                                                                                                         
>>>> # how to build                                                                                          
>>>>   $meson build 
>>>
>>> Did you try something like `CFLAGS='-I/usr/src/linux-headers-4.19.0' meson build`?
>>>
>> Yes, I tried but no success.. 
> 
> Could you please share the meson-log.txt for this case, or at least the
> relevant part, where it tries to compile the check for the struct?
> 
Thanks for your response.

Sure. 

I attached it. This is the result of 
$CFLAGS='-I/usr/src/linux-headers-4.19.0-hoge/include' meson build
(Actually linux/net_tstamp.h is located under /usr/src/linux-headers-4.19.0-hoge/include)

Just FYI.
I also asking the same question at meson git issue.
https://github.com/mesonbuild/meson/issues/7456


>>
>>
>>>>                                                                                          
>>>>   $ninja -C build                                                                                       
>>>>                                                                                                         
>>>> # Log of "meson build"                                                                                  
>>>>   |Dependency avtp from subproject subprojects/avtp found: YES 0.1.0                                    
>>>>   |Checking for type "struct sock_txtime" : NO                                                          
>>>>                                                                                                         
>>>> # The code of gst-plugins-bad/ext/avtp/meson.build                                                      
>>>>     if avtp_dep.found() and cc.has_type('struct sock_txtime', prefix : '#include <linux/net_tstamp.h>') 
>>>>        gstavtp = library('gstavtp', avtp_sources,                                                       
>>>>        .....                                                                                            
>>>>     )                                                                                                   
>>>>
>>>> ============================================================
>>>> John Rama
>>>> _______________________________________________
>>>> gstreamer-devel mailing list
>>>> gstreamer-devel at lists.freedesktop.org
>>>> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: meson-log.txt.gz
Type: application/x-gzip
Size: 203034 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200714/57de4ef5/attachment-0001.bin>


More information about the gstreamer-devel mailing list