Problem building comedi on fedora with kernel 5.8.18

20 views
Skip to first unread message

Anders Blomdell

unread,
Nov 16, 2020, 10:31:40 AM11/16/20
to comed...@googlegroups.com
# ../../comedi/configure --disable-rtai --disable-pcmcia --disable-usb --with-kernel-release=5.8.18-200.fc32.x86_64
.... Lots of config output omitted ...
checking for Linux build in /lib/modules/5.8.18-200.fc32.x86_64/build... yes
checking for separate Linux source and build directory... yes
checking for Linux source in $(abs_objtree)... not found
configure: error: Linux source directory not found
#

The problem seems to be:

if test -z "$dir"; then
# 4.20
dir=`sed -n -e '/^__sub-make:$/,/^$/s/.* -C *\([^[:space:]]*\).*/\1/p' "$LINUX_DIR/Makefile"`
fi

which triggers for 5.8.18 (but not for 5.7.14).

Regards

Anders
--
Anders Blomdell Email: anders....@control.lth.se
Department of Automatic Control
Lund University Phone: +46 46 222 4625
P.O. Box 118
SE-221 00 Lund, Sweden

Ian Abbott

unread,
Nov 17, 2020, 7:48:01 AM11/17/20
to comed...@googlegroups.com
On 16/11/2020 15:31, Anders Blomdell wrote:
> # ../../comedi/configure   --disable-rtai   --disable-pcmcia
> --disable-usb   --with-kernel-release=5.8.18-200.fc32.x86_64
> .... Lots of config output omitted ...
> checking for Linux build in /lib/modules/5.8.18-200.fc32.x86_64/build...
> yes
> checking for separate Linux source and build directory... yes
> checking for Linux source in $(abs_objtree)... not found
> configure: error: Linux source directory not found
> #
>
> The problem seems to be:
>
>             if test -z "$dir"; then
>             # 4.20
>             dir=`sed -n -e '/^__sub-make:$/,/^$/s/.* -C
> *\([^[:space:]]*\).*/\1/p' "$LINUX_DIR/Makefile"`
>         fi
>
> which triggers for 5.8.18 (but not for 5.7.14).
>
> Regards
>
> Anders

Hi Anders,

I'll try and reproduce it. (I need to install Fedora 32 in VirtualBox
first.)

In other news, I can't get the serial2002 driver to build for kernel
5.10 and later (at least for most architectures), so I had to add checks
to see if the kernel can support it and skip building it if not.

--
-=( Ian Abbott <abb...@mev.co.uk> || MEV Ltd. is a company )=-
-=( registered in England & Wales. Regd. number: 02862268. )=-
-=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=-
-=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || www.mev.co.uk )=-

Ian Abbott

unread,
Nov 17, 2020, 2:51:13 PM11/17/20
to comed...@googlegroups.com
On 17/11/2020 12:47, Ian Abbott wrote:
> On 16/11/2020 15:31, Anders Blomdell wrote:
>> # ../../comedi/configure   --disable-rtai   --disable-pcmcia
>> --disable-usb   --with-kernel-release=5.8.18-200.fc32.x86_64
>> .... Lots of config output omitted ...
>> checking for Linux build in
>> /lib/modules/5.8.18-200.fc32.x86_64/build... yes
>> checking for separate Linux source and build directory... yes
>> checking for Linux source in $(abs_objtree)... not found
>> configure: error: Linux source directory not found
>> #
>>
>> The problem seems to be:
>>
>>              if test -z "$dir"; then
>>              # 4.20
>>              dir=`sed -n -e '/^__sub-make:$/,/^$/s/.* -C
>> *\([^[:space:]]*\).*/\1/p' "$LINUX_DIR/Makefile"`
>>          fi
>>
>> which triggers for 5.8.18 (but not for 5.7.14).
>>
>> Regards
>>
>> Anders
>
> Hi Anders,
>
> I'll try and reproduce it. (I need to install Fedora 32 in VirtualBox
> first.)

I've added a workaround. It looks like the source and build directories
are not actually separate for Fedora's kernels. The code in Fedora's
/lib/modules/${kernelversion}/build/Makefile is a bit tricky to parse,
so I bodged it by checking for the "include/sound" directory (I could
have chosen various other directories) that would not be expected to be
in a separate build directory.

It seems to work for now. It will probably break if Fedora do start
splitting the source and build directories in their kernel-devel packages.

After the git pull, you will need to run ./autogen.sh to update the
configure script.

Anders Blomdell

unread,
Nov 23, 2020, 5:38:54 AM11/23/20
to comed...@googlegroups.com


On 2020-11-17 13:47, Ian Abbott wrote:
> On 16/11/2020 15:31, Anders Blomdell wrote:
>> # ../../comedi/configure   --disable-rtai   --disable-pcmcia --disable-usb   --with-kernel-release=5.8.18-200.fc32.x86_64
>> .... Lots of config output omitted ...
>> checking for Linux build in /lib/modules/5.8.18-200.fc32.x86_64/build... yes
>> checking for separate Linux source and build directory... yes
>> checking for Linux source in $(abs_objtree)... not found
>> configure: error: Linux source directory not found
>> #
>>
>> The problem seems to be:
>>
>>              if test -z "$dir"; then
>>              # 4.20
>>              dir=`sed -n -e '/^__sub-make:$/,/^$/s/.* -C *\([^[:space:]]*\).*/\1/p' "$LINUX_DIR/Makefile"`
>>          fi
>>
>> which triggers for 5.8.18 (but not for 5.7.14).
>>
>> Regards
>>
>> Anders
>
> Hi Anders,
>
> I'll try and reproduce it. (I need to install Fedora 32 in VirtualBox first.)
>
> In other news, I can't get the serial2002 driver to build for kernel 5.10 and later (at least for most architectures), so I had to add checks to see if the kernel can support it and skip building it if not.
>
Skipping serial2002 for good is quite OK with us, we have shifted this functionality
to userspace (where it belongs). Abusing set_fs was a hack, while waiting for support
for userspace drivers in comedilib.

Best regards
Reply all
Reply to author
Forward
0 new messages