Page 1 of 5 123 ... LastLast
Results 1 to 10 of 41

Thread: In which directory should I compile from source?

  1. #1

    Question In which directory should I compile from source?

    I have downloaded the sources of Bacula 7.2.0 as I don't find that program in any repo.

    My questions are:

    - Where should I put the source files before running compilation?
    - Does the compiler take care where to put the output (compiled binary) files or if not - where should I manually move them?
    - How do I proceed with upgrades in the long term when something like this is not installed from RPM but from source?
    - Is it possible that I create an RPM of the final result for easier installation afterwards? (maybe we can include it in some repo afterwards? no idea how this works...)

  2. #2
    Join Date
    Sep 2012
    Posts
    4,941

    Default Re: In which directory should I compile from source?

    Quote Originally Posted by heyjoe View Post
    - Where should I put the source files before running compilation?
    Anywhere you like. Of course you need write access to this directory. It is usually discouraged to compile as root.
    - Does the compiler take care where to put the output (compiled binary) files or if not - where should I manually move them?
    Compiler?!? Of course not. Compiler takes care about compilation. Most projects come with Makefiles containing something like "install" target that installs binaries after they are built. Consult documentation for your software.
    - How do I proceed with upgrades in the long term when something like this is not installed from RPM but from source?
    Assuming your project provides "uninstall" target and you still have originally configured Makefile for current version I would do "make uninstall" followed by "make install" of new version. Consult documentation for your software.
    - Is it possible that I create an RPM of the final result for easier installation afterwards? (maybe we can include it in some repo afterwards? no idea how this works...)
    Yes; actually there is 7.2 project for 42.1 (see software.opensuse.org); you may consider cooperating with this user and submitting it to primary repository Archiving:Backup.

  3. #3

    Default Re: In which directory should I compile from source?

    Thanks for explaining. I hope you don't mind me asking a bit more.

    Considering this:

    Quote Originally Posted by arvidjaar View Post
    Anywhere you like. Of course you need write access to this directory. It is usually discouraged to compile as root.
    does "make install" take care of proper file ownership and permissions? What does only "make" do?

    Assuming your project provides "uninstall" target and you still have originally configured Makefile for current version I would do "make uninstall" followed by "make install" of new version. Consult documentation for your software.
    Hm. Looking at the documentation it seems they actually recommend not to run "make uninstall".

    Yes; actually there is 7.2 project for 42.1 (see software.opensuse.org); you may consider cooperating with this user and submitting it to primary repository Archiving:Backup.
    Searching for bacula leads me here:

    http://software.opensuse.org/package/bacula

    and in subsection Leap 42.1 I see home:gody Source rpm. I suppose this means only the sources are in this package? How do I proceed to cooperate with someone as you suggest?

  4. #4
    Join Date
    Sep 2012
    Posts
    4,941

    Default Re: In which directory should I compile from source?

    Quote Originally Posted by heyjoe View Post
    does "make install" take care of proper file ownership and permissions? What does only "make" do?
    it does whatever is written in makefile. I have no idea what it does in your specific case.
    Looking at the documentation it seems they actually recommend not to run "make uninstall".
    You see, reading documentation pays off
    I suppose this means only the sources are in this package?
    Did you try to click on this link? There are binary RPMs for a lot of Linux flavors.
    How do I proceed to cooperate with someone as you suggest?
    You can always (try to) contact author by e-mail for a start ... of course if you have something to offer

  5. #5

    Default Re: In which directory should I compile from source?

    Actually I just found this:

    http://software.opensuse.org/downloa...package=bacula

    and there are compiled RPM's.

    But I wonder - why is that not in the Archiving:Backup?

    I don't have the email address of the person and don't know where to get it. But I already wrote on this page and there is no reply.

    I would be glad to help with whatever I can but how does this whole thing with the repos work?

  6. #6
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,284
    Blog Entries
    15

    Default Re: In which directory should I compile from source?

    Hi
    Have a read here;
    http://lists.opensuse.org/opensuse-p.../msg00062.html

    https://software.opensuse.org/package/bareos

    For contact details;
    https://build.opensuse.org/package/s...package=bacula
    and check the changelog for an email address;
    https://build.opensuse.org/package/v...anges?expand=1

    If that doesn't work, click on users and follow the lefthand link;
    https://build.opensuse.org/package/u...me:gody/bacula

    If you really wanting to compile, then first stop is the spec file for the configure options (there are a few) before running make;
    https://build.opensuse.org/package/v....spec?expand=1
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    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: In which directory should I compile from source?

    Quote Originally Posted by malcolmlewis View Post
    Yes, I have already been there.

    I have been playing with Bareos but it cannot even label my tape. Unfortunately their mailing list did not help. They offer to look into "my problem" if I pay 290eur for yearly subscription (cough). I have never had tape problems with Bacula, so I decided to look for a way to install latest Bacula on Leap.


    For contact details;
    https://build.opensuse.org/package/s...package=bacula
    and check the changelog for an email address;
    https://build.opensuse.org/package/v...anges?expand=1

    If that doesn't work, click on users and follow the lefthand link;
    https://build.opensuse.org/package/u...me:gody/bacula
    Thanks.

    If you really wanting to compile, then first stop is the spec file for the configure options (there are a few) before running make;
    https://build.opensuse.org/package/v....spec?expand=1
    Ok I will try to easy way first. Thanks again!

  8. #8

    Default Re: In which directory should I compile from source?

    It seems there are quite a few issues with that hosted 7.2.0 on the repo. I have tried to contact the person and waiting for a reply.

    I might try to compile though. But how do I use this info:

    Quote Originally Posted by malcolmlewis View Post
    If you really wanting to compile, then first stop is the spec file for the configure options (there are a few) before running make;
    https://build.opensuse.org/package/v....spec?expand=1

  9. #9
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,284
    Blog Entries
    15

    Default Re: In which directory should I compile from source?

    Quote Originally Posted by heyjoe View Post
    It seems there are quite a few issues with that hosted 7.2.0 on the repo. I have tried to contact the person and waiting for a reply.

    I might try to compile though. But how do I use this info:
    Hi
    What are the issues as this may impact your compile options....?
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  10. #10

    Default Re: In which directory should I compile from source?

    Quote Originally Posted by malcolmlewis View Post
    Hi
    What are the issues as this may impact your compile options....?
    It was impossible to start any of the DIR, FD or SD services from YaST or from command line (I am using the exact same config files as in 5.2.13). Looking at journalctl I saw:

    Code:
    Jan 07 19:50:02 i7 systemd[1]: bacula-dir.service never wrote its PID file. Failing.
    Jan 07 19:50:02 i7 systemd[1]: Failed to start Bacula Director Daemon service.
    Obviously bacula could not create it's PID files in /var/run because that directory is owned and writeable by root only.

    Then I found this info and manually changed the systemd bacula-*.services to use User=root. Originally they were set to use User=bacula. One of the services even had User= and Group= (both empty). I can't recall if it was FD or SD but I fixed them both to be User=root Group=bacula.

    I am not an expert in systemd and I really don't know if setting a service to run as root this way is appropriate. I suppose it is just some workaround. Bacula 5.2.13 never had this problems, neither did Bareos. But as I mentioned they have other issues - Bacula 5.2.13 doesn't respect the Exclude Dir Containing option and Bareos can't label the tapes. That is the main reason I decided to move to latest Bacula.

    Anyway with that workaround in services now FD and SD can be started from YaST. But for DIR I am still getting errors. In /var/log/bacula/bacula.log:

    Code:
    07-Jan 20:19 bacula-dir JobId 0: Fatal error: Please replace this null libbaccats library with a proper one.
    07-Jan 20:19 bacula-dir JobId 0: Fatal error: Could not open Catalog "MyCatalog", database "bacula".
    07-Jan 20:19 bacula-dir ERROR TERMINATION
    Please correct configuration file: /etc/bacula/bacula-dir.conf
    I don't know why this happens. The DB credentials and permissions are correct as they obviously worked in the same config when used in Bacula 5.2.13. As for the libbaccats thing - after a some Google searching I found people checking for dependencies this way, so I did that too:

    Code:
    # ldd -v /usr/lib64/libbaccats-7.2.0.so 
            linux-vdso.so.1 (0x00007ffd55d4b000)
            libc.so.6 => /lib64/libc.so.6 (0x00007fd00180d000)
            /lib64/ld-linux-x86-64.so.2 (0x0000565165176000)
    
    
            Version information:
            /usr/lib64/libbaccats-7.2.0.so:
                    libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6
            /lib64/libc.so.6:
                    ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
                    ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
    However I don't know how to use this info and if this output shows any actual problem.

    I also notice is that rcbacula-dir, rcbacula-fd and rcbacula-sd are not available as cli commands. No idea what the reason for that might be.

Page 1 of 5 123 ... LastLast

Tags for this Thread

Posting Permissions

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