Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Build fails on OBS, but doesn't on actual fresh opensuse install.

  1. #1

    Default Build fails on OBS, but doesn't on actual fresh opensuse install.

    I keep getting undefined reference errors, but I don't know why. All dependencies are present, and it builds just fine on my personal system, but for some reason it can't on the OBS. https://build.opensuse.org/package/s...radon/XRootGIF Can anyone take a look and see what could be going wrong?

  2. #2
    Join Date
    Sep 2012
    Posts
    5,742

    Default Re: Build fails on OBS, but doesn't on actual fresh opensuse install.

    Quote Originally Posted by Charadon View Post
    I keep getting undefined reference errors, but I don't know why. All dependencies are present, and it builds just fine on my personal system
    1. Did you check which library provides missing symbols and if this library is included in BuildRequires?
    2. Did you compare compiler/linker options on your system and on OBS?

  3. #3

    Default Re: Build fails on OBS, but doesn't on actual fresh opensuse install.

    1. Yep, it keeps complaining about missing references that are found in imlib2-devel, and it also complains about having some missing references that are found in libX11-devel. Checking the log on OBS, it definitely installed.

    2. Yeah, using the same compiler.

  4. #4
    Join Date
    Sep 2012
    Posts
    5,742

    Default Re: Build fails on OBS, but doesn't on actual fresh opensuse install.

    Quote Originally Posted by Charadon View Post
    Yeah, using the same compiler.
    And you get exactly the same command lines with exactly the same options locally?

    Normally libraries should come after object files on command line. Linker sequentially iterates over arguments and is using each library to resolve missing references; it does not go back and tries previous arguments. In OBS log all library options are before object files, so I'd say failure to resolve is expected.

  5. #5

    Default Re: Build fails on OBS, but doesn't on actual fresh opensuse install.

    Yep, same commands are being ran on my personal system (libraries coming before objects) I'll even include the full output.
    Code:
    gcc -Wall -zrelro -znow  -lX11 -lgif -lImlib2 -lXinerama -D VERSION=\"1.4.2\" -D HAVE_XINERAMA  -I/usr/lib64/gcc/x86_64-suse-linux/7/include  -I/usr/local/include  -I/usr/lib64/gcc/x86_64-suse-linux/7/include-fixed  -I/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/include  -I/usr/include   -c xrootgif.c -o xrootgif.o
    gcc -Wall -zrelro -znow  -lX11 -lgif -lImlib2 -lXinerama -D VERSION=\"1.4.2\" -D HAVE_XINERAMA  -I/usr/lib64/gcc/x86_64-suse-linux/7/include  -I/usr/local/include  -I/usr/lib64/gcc/x86_64-suse-linux/7/include-fixed  -I/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/include  -I/usr/include   -c globals.c -o globals.o
    gcc -Wall -zrelro -znow  -lX11 -lgif -lImlib2 -lXinerama -D VERSION=\"1.4.2\" -D HAVE_XINERAMA  -I/usr/lib64/gcc/x86_64-suse-linux/7/include  -I/usr/local/include  -I/usr/lib64/gcc/x86_64-suse-linux/7/include-fixed  -I/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/include  -I/usr/include   -c output.c -o output.o
    gcc -Wall -zrelro -znow  -lX11 -lgif -lImlib2 -lXinerama -D VERSION=\"1.4.2\" -D HAVE_XINERAMA  -I/usr/lib64/gcc/x86_64-suse-linux/7/include  -I/usr/local/include  -I/usr/lib64/gcc/x86_64-suse-linux/7/include-fixed  -I/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/include  -I/usr/include   -c sample.c -o sample.o
    gcc -Wall -zrelro -znow  -lX11 -lgif -lImlib2 -lXinerama -D VERSION=\"1.4.2\" -D HAVE_XINERAMA  -I/usr/lib64/gcc/x86_64-suse-linux/7/include  -I/usr/local/include  -I/usr/lib64/gcc/x86_64-suse-linux/7/include-fixed  -I/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/include  -I/usr/include   -c gif.c -o gif.o
    gcc -Wall -zrelro -znow  -lX11 -lgif -lImlib2 -lXinerama -D VERSION=\"1.4.2\" -D HAVE_XINERAMA  -I/usr/lib64/gcc/x86_64-suse-linux/7/include  -I/usr/local/include  -I/usr/lib64/gcc/x86_64-suse-linux/7/include-fixed  -I/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/include  -I/usr/include   -c pixmap_allocate.c -o pixmap_allocate.o
    gcc -Wall -zrelro -znow  -lX11 -lgif -lImlib2 -lXinerama -D VERSION=\"1.4.2\" -D HAVE_XINERAMA  -I/usr/lib64/gcc/x86_64-suse-linux/7/include  -I/usr/local/include  -I/usr/lib64/gcc/x86_64-suse-linux/7/include-fixed  -I/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/include  -I/usr/include   -c daemon.c -o daemon.o
    gcc -zrelro -znow  -lX11 -lgif -lImlib2 -lXinerama xrootgif.o globals.o output.o sample.o gif.o pixmap_allocate.o daemon.o -o xrootgif
    Looks largely the same as the OBS log, except that it succeeded

  6. #6
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    29,111
    Blog Entries
    15

    Default Re: Build fails on OBS, but doesn't on actual fresh opensuse install.

    Hi
    Build's fine locally, with just configure or using osc locally?

    Try changing your configure to use the macro which is %configure as it adds extra build flags.
    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: Build fails on OBS, but doesn't on actual fresh opensuse install.

    Builds fine locally without osc (I haven't tried it with osc yet) and %configure didn't do anything. I even swapped out the other commands with macros (Such as switching make with %make_build) and still has the same error.

  8. #8
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    29,111
    Blog Entries
    15

    Default Re: Build fails on OBS, but doesn't on actual fresh opensuse install.

    Quote Originally Posted by Charadon View Post
    Builds fine locally without osc (I haven't tried it with osc yet) and %configure didn't do anything. I even swapped out the other commands with macros (Such as switching make with %make_build) and still has the same error.
    Hi
    Makefile.in should be;

    Code:
    $(CC) $(LNFLAGS) -o xrootgif $(OBJ) $(LIBRARIES)
    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!

  9. #9
    Join Date
    Sep 2012
    Posts
    5,742

    Default Re: Build fails on OBS, but doesn't on actual fresh opensuse install.

    Quote Originally Posted by Charadon View Post
    Yep, same commands are being ran on my personal system (libraries coming before objects)
    Well, this fails for me as expected and if I reverse order everything works. So I would suggest you patch Makefile so it works. Why it does not fail on your system remains mystery, but that's out of scope of this thread. So far OBS behaves as it should.

  10. #10
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    29,111
    Blog Entries
    15

    Default Re: Build fails on OBS, but doesn't on actual fresh opensuse install.

    Quote Originally Posted by malcolmlewis View Post
    Hi
    Makefile.in should be;

    Code:
    $(CC) $(LNFLAGS) -o xrootgif $(OBJ) $(LIBRARIES)
    Hi
    Pushed an SR to you... https://build.opensuse.org/request/show/811192
    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!

Page 1 of 2 12 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
  •