[ovs-discuss] line 17: /usr/local/share/openvswitch/scripts/ovs-lib: No such file or directory

Martin Xu martinxu9.ovs at gmail.com
Thu Sep 20 21:11:02 UTC 2018


On Thu, Sep 20, 2018 at 2:09 PM Martin Xu <martinxu9.ovs at gmail.com> wrote:

> Hi Paul,
>
> Think I might have figured out what the problem is. The instructions on
> the blog: ./boot, ./configure and then make. Then making a tarball out of
> the result for the rpmbuild SOURCE.
> By default, OVS uses /usr/local as the prefix, so during the "make"
> process, the @pkgdatadir@ is replaced by the /usr/local/share/openvswitch
> in the eventual file ovs-kmod-ctl (not the ovs-kmod-ctl.in). I copied and
> pasted one line below from my command line while it's building:
>
> -e 's,[@]pkgdatadir[@],/usr/local/share/openvswitch,g' \
>
>
> This ovs-kmod-ctl is also packaged into the tarball and put int
> _topdir/SOURCES. So the subsequent command rpmbuild does not regenerate
> this file from ovs-kmod-ctl.in . Now I don't know if that's a reasonable
> thing to do nor not in the build/compile world. What I usually do is "make
> dist" to generate the tarball, and it doesn't include this file, only the
> ovs-kmod-ctl. When I do rpmbuild, I can see it's replacing the pkgdatadir
> string with /usr/share/openvswitch.
>
Correction here: make dist generates a tarball NOT including the
ovs-kmod-ctl, only the ovs-kmod-ctl.in file.

>
> I was not able to run through the instructions on that blog even with
> ./configure CFLAGS="-fPIC". But I did an experiment with my own build, just
> add the ovs-kmod-ctl to the tarball. It didn't get regenerated.
>
> As mentioned here on ovs website, you can change the prefix ./configure
> --prefix=/usr, then make. This time the ovs-kmod-ctl file has at line 17: .
> "/usr/share/openvswitch/scripts/ovs-lib" || exit 1
> http://docs.openvswitch.org/en/latest/intro/install/general/#configuring
>
> Since I ran into errors when I ran rpmbuild command, I couldn't verify my
> theory. I'm fairly confident it should solve your problem. I guess the
> question now is what changed since it was working for you before.
>
>
> Martin
>
> On Thu, Sep 20, 2018 at 12:24 PM Martin Xu <martinxu9.ovs at gmail.com>
> wrote:
>
>> I’m going through it now. I’ll let you know if I figured out something.
>> So far I stumbled upon the PIC flag thing, I’m going through your other
>> emails as well.
>>
>> Martin
>>
>> On Thu, Sep 20, 2018 at 11:35 AM Paul Greenberg <greenpau at outlook.com>
>> wrote:
>>
>>> Hi Martin,
>>>
>>> I always use the same process. It described here
>>> https://truesdn.blogspot.com/2018/08/how-to-compile-open-virtual-network-ovn.html?m=1
>>>
>>> Regards,
>>> Paul
>>>
>>> Best Regards,
>>> Paul Greenberg
>>>
>>> ------------------------------
>>> *From:* Martin Xu <martinxu9.ovs at gmail.com>
>>> *Sent:* Thursday, September 20, 2018 2:19 PM
>>> *To:* Gregory Rose; Ben Pfaff
>>> *Cc:* greenpau at outlook.com; bugs at openvswitch.org
>>> *Subject:* Re: [ovs-discuss] line 17:
>>> /usr/local/share/openvswitch/scripts/ovs-lib: No such file or directory
>>>
>>> I don't think so. At least I didn't directly change anything related to
>>> this. Do you guys mind sharing the exact commands you used to build the
>>> RPM? I've tried building with the fedora spec file. I don't see it on mine
>>> after installation.
>>>
>>> Sorry I'm replying out of order here, but I agree with Ben's email
>>> below. That seems to be the problem. I looked through some of our code.
>>>
>>> The fedora spec file uses this macro %{_datadir} as the path prefix, and
>>> this could evaluate to /usr/share/ but can be overwritten or be something
>>> else on a particular system. That line 17 in ovs-kmod-ctl is written as
>>> this,
>>>
>>> . "@pkgdatadir@/scripts/ovs-lib" || exit 1
>>>
>>> At build time, the @pkgdatadir@ in some of our files (ovs-kmod-ctl is
>>> one of them) are being replaced. I haven't figured out exactly how to put
>>> my own string in there through configuration so that my installation goes
>>> into /usr/share and this string is replaced by /usr/local/share. I think
>>> basically that's problem seen here. Maybe some of the folks from redhat
>>> might know. Or if I can duplicate the issue myself, I might be able to
>>> figure out why.
>>>
>>> Martin
>>> On Mon, Sep 17, 2018 at 5:23 PM Gregory Rose <gvrose8192 at gmail.com>
>>> wrote:
>>>
>>>>
>>>> On 9/14/2018 3:36 PM, Paul Greenberg wrote:
>>>> > Running the latest:
>>>> >
>>>> >
>>>> https://github.com/openvswitch/ovs/commit/cd2c1d3b1e03b41f0e2c964fcbdb1e82cde7c794
>>>> >
>>>> > An attempt to start "ovs-vswitchd.service" fails:
>>>> >
>>>> > ovs-ctl[2078]: /usr/share/openvswitch/scripts/ovs-kmod-ctl: line 17:
>>>> /usr/local/share/openvswitch/scripts/ovs-lib: No such file or directory
>>>> >
>>>> > The "/usr/local/share/openvswitch/scripts/ovs-lib" does not exists,
>>>> but "/usr/share/openvswitch/scripts/ovs-lib"
>>>> >
>>>> > Once I amended the line 17 to
>>>> "/usr/share/openvswitch/scripts/ovs-lib", things started working.
>>>>
>>>> Martin,
>>>>
>>>> I'm seeing this as well - do you think it's related to your recent
>>>> changes?
>>>>
>>>> Thanks,
>>>>
>>>> - Greg
>>>>
>>>> > _______________________________________________
>>>> > discuss mailing list
>>>> > discuss at openvswitch.org
>>>> > https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
>>>>
>>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20180920/ab5b98bd/attachment-0001.html>


More information about the discuss mailing list