Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: Getting File not found error when building

  1. #1

    Question Getting File not found error when building

    Hey guys,

    I am building a library, but OBS keeps saying file not found, can somebody tell me whan I have wrong here:

    On my %install section of the spec file I have:

    *** not the real file name ***

    Code:
    %install
    %{__make} install DESTDIR=%{buildroot}
    install -D -m 0755 library.a %{buildroot}/%{_lib}/library.a
    And on my %files I have this:

    Code:
    %files
    %defattr(-,root,root,-)
    %{buildroot}/%{_lib}/library.a
    Error I'm getting:

    Code:
    [   87s] + install -D -m 0755 library.a /home/abuild/rpmbuild/BUILDROOT/library-version.x86_64/lib64/library.a
    [   87s] install: cannot stat 'library.a': No such file or directory
    Thanks,

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    32,336
    Blog Entries
    15

    Default Re: Getting File not found error when building

    On Thu 16 Jan 2014 11:46:01 PM CST, jurgen73 wrote:


    Hey guys,

    I am building a library, but OBS keeps saying file not found, can
    somebody tell me whan I have wrong here:

    On my %install section of the spec file I have:

    *** not the real file name ***


    Code:
    --------------------
    %install
    %{__make} install DESTDIR=%{buildroot}
    install -D -m 0755 library.a %{buildroot}/%{_lib}/library.a
    --------------------


    And on my %files I have this:


    Code:
    --------------------
    %files
    %defattr(-,root,root,-)
    %{buildroot}/%{_lib}/library.a
    --------------------


    Error I'm getting:


    Code:
    --------------------
    [ 87s] + install -D -m 0755
    library.a /home/abuild/rpmbuild/BUILDROOT/library-version.x86_64/lib64/library.a
    [ 87s] install: cannot stat 'library.a': No such file or directory
    --------------------


    Thanks,


    Hi
    So does library.a exist in the top part of build? It's not down in say
    a src directory? Are you building locally first with osc, if so browse
    to your build-root, or run osc lbl less to see where it's at during
    %install.

    Plus %{__make} is deprecated, use %makeinstall or %make_install as
    DESTDIR is defined in these rpm macros as %{buildroot}

    --
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.2 Kernel 3.11.6-4-desktop
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!


  3. #3

    Default Re: Getting File not found error when building

    Quote Originally Posted by malcolmlewis View Post
    Hi
    So does library.a exist in the top part of build? It's not down in say
    a src directory? Are you building locally first with osc, if so browse
    to your build-root, or run osc lbl less to see where it's at during
    %install.

    Plus %{__make} is deprecated, use %makeinstall or %make_install as
    DESTDIR is defined in these rpm macros as %{buildroot}

    --
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.2 Kernel 3.11.6-4-desktop
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!
    All the files exist, not just .a, but also .so .lo, etc. I have also tried %makeinstall as per Adrian, but I still get the same error.

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    32,336
    Blog Entries
    15

    Default Re: Getting File not found error when building

    On Wed 22 Jan 2014 12:26:01 AM CST, jurgen73 wrote:


    malcolmlewis;2616734 Wrote:
    > Hi
    > So does library.a exist in the top part of build? It's not down in say
    > a src directory? Are you building locally first with osc, if so browse
    > to your build-root, or run osc lbl less to see where it's at during
    > %install.
    >
    > Plus %{__make} is deprecated, use %makeinstall or %make_install as
    > DESTDIR is defined in these rpm macros as %{buildroot}
    >
    > --
    > Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    > openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.2 Kernel 3.11.6-4-desktop
    > If you find this post helpful and are logged into the web interface,
    > please show your appreciation and click on the star below... Thanks!


    All the files exist, not just .a, but also .so .lo, etc. I have also
    tried %makeinstall as per Adrian, but I still get the same error.


    Hi
    I'm guessing your building locally? If so, go to your buildroot
    ->home/abuild/BUILD and look down in there for library.a to see where
    it is.

    Else, is it on OBS?, if so can you provide the link to the
    project/package.

    --
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.2 Kernel 3.11.6-4-desktop
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!


  5. #5

    Default Re: Getting File not found error when building

    The closest I've gotten is when I get this:

    Code:
    library-version.noarch.rpm: directories not owned by a package:
    What do I have to put in %files?

    Right now I have /usr/lib/library.a, so, etc.

    But when I put %{buildroot}/%{_lib}/library.a, so, etc. I get the not found I said before.

  6. #6
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    32,336
    Blog Entries
    15

    Default Re: Getting File not found error when building

    On Wed 22 Jan 2014 12:56:01 AM CST, jurgen73 wrote:


    The closest I've gotten is when I get this:


    Code:
    --------------------
    library-version.noarch.rpm: directories not owned by a package:
    --------------------


    What do I have to put in %files?

    Right now I have /usr/lib/library.a, so, etc.

    But when I put %{buildroot}/%{_lib}/library.a, so, etc. I get the not
    found I said before.


    Hi
    You need to use %dir in the %files section, start with the deepest and
    then work back, in your case it's probably;
    Code:
    %dir %{_lib}
    --
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.2 Kernel 3.11.6-4-desktop
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!


  7. #7

    Default Re: Getting File not found error when building

    Quote Originally Posted by malcolmlewis View Post
    Hi
    You need to use %dir in the %files section, start with the deepest and
    then work back, in your case it's probably;
    Code:
    %dir %{_lib}
    --
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.2 Kernel 3.11.6-4-desktop
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!
    I found that the files are in src/.libs , so I changed my %files to have

    /src/.libs/
    and
    /.libs

    Before the file names, but it still says file not found, even though the path it shows me should be correct:

    /home/abuild/rpmbuild/BUILDROOT/library-version.x86_64/src/.libs/file.a or .so, etc
    and
    /home/abuild/rpmbuild/BUILDROOT/library-version.x86_64/.libs/file.a or .so, etc

    I also want to say that higher in the log I can see it does go to that folder as .libs/filename.o so the folder does exist and files are there, also %dir gives me nothing.

  8. #8
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    32,336
    Blog Entries
    15

    Default Re: Getting File not found error when building

    On Sat 25 Jan 2014 08:26:02 PM CST, jurgen73 wrote:


    malcolmlewis;2618322 Wrote:
    > Hi
    > You need to use %dir in the %files section, start with the deepest and
    > then work back, in your case it's probably;
    > >

    Code:
    --------------------
    > >

    > %dir %{_lib}
    >

    --------------------
    > >

    >
    > --
    > Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    > openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.2 Kernel 3.11.6-4-desktop
    > If you find this post helpful and are logged into the web interface,
    > please show your appreciation and click on the star below... Thanks!


    I found that the files are in src/.libs , so I changed my %files to have

    /src/.libs/
    and
    ../libs

    Before the file names, but it still says file not found, even though the
    path it shows me should be correct:

    /home/abuild/rpmbuild/BUILDROOT/library-version.x86_64/src/.libs/file.a
    or .so, etc
    and
    /home/abuild/rpmbuild/BUILDROOT/library-version.x86_64/.libs/file.a or
    ..so, etc

    I also want to say that higher in the log I can see it does go to that
    folder as .libs/filename.o so the folder does exist and files are there,
    also %dir gives me nothing.


    Hi
    So you should be able to run;
    Code:
    %install
    install -Dm0644 src/.libs/file.a %{buildroot}%{_lib}/file.a
    And no, your %files should be;
    Code:
    %files
    %defattr(-,root,root)
    %{_lib}/file.a
    --
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.2 Kernel 3.11.6-4-desktop
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!


  9. #9

    Default Re: Getting File not found error when building

    Quote Originally Posted by malcolmlewis View Post
    Hi
    So you should be able to run;
    Code:
    %install
    install -Dm0644 src/.libs/file.a %{buildroot}%{_lib}/file.a
    And no, your %files should be;
    Code:
    %files
    %defattr(-,root,root)
    %{_lib}/file.a
    I tried that but I still get

    Code:
    install: cannot stat 'src/.libs/library.*': No such file or directory
    Any other ideas?

  10. #10

    Default Re: Getting File not found error when building

    Never mind, the file(s) is says it cannot find are not in src/.libs but in src, so I guess it's going to work this time.

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •