bugDatabase-driven manual pager suite - Bugs: bug #56734, Man-db 2.8.6.1 doesn't build on...

 
 

bug #56734: Man-db 2.8.6.1 doesn't build on macOS

Submitter:  George Plymale II <ylluminarious>
Submitted:  Fri 09 Aug 2019 07:48:07 AM UTC
   
 
Category:  None Severity:  4 - Important
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  cjwatson
Open/Closed:  Closed

Discussion locked!

Jump to the original submission

  Spam posted by _355136
  Spam posted by _335004
  Spam posted by _335004
  Spam posted by _335004
  Spam posted by _335004
  Spam posted by _335004
Tue 27 Aug 2019 04:07:06 PM UTC, comment #13: 

Ok, the https://quantum-mirror.hu mirror finally started serving the tarball so I can confirm 2.8.7 works! Unfortunately, https://bigsearcher.com is still giving a 404, which you can see here: https://bigsearcher.com/mirrors/nongnu/man-db/man-db-2.8.7.tar.xz

I'll update the Portfile and make a PR to MacPorts once Bigsearcher is working as well.

George Plymale II <ylluminarious>
Mon 26 Aug 2019 07:33:17 PM UTC, comment #12: 

Thanks a lot Colin! I'll test it as soon as I can fetch the tarball from the download mirror: https://download.savannah.nongnu.org/releases/man-db/man-db-2.8.7.tar.xz

Right now it's giving a 404, but apparently this is normal since it takes a while for the mirrors to serve the tarball.

George Plymale II <ylluminarious>
Mon 26 Aug 2019 04:47:58 PM UTC, comment #11: 

OK, thanks for testing!  Today I released man-db 2.8.7 with these fixes, and I also just updated the homepage as you suggest.

Colin Watson <cjwatson>
Group administrator
Sat 24 Aug 2019 09:15:02 PM UTC, comment #10: 

Hey, it seems your new tarball worked. I went into the directory and ran the following commands:


$ autoreconf
$ ./configure --disable-cache-owner --disable-setuid && make


And I see the binaries are now built with no error messages! :)

I haven't yet built it with MacPorts itself because I'm not sure how to get it to fetch a tarball on my local filesystem, but I think we can safely close this bug now from what I'm seeing.

Would you also mind updating the homepage to include a mention to MacPorts along with the Homebrew tap? Users just have to run:


sudo port install man-db


I'm no longer using Homebrew anymore, along with a significant amount of others I've heard around forums and such, because the Homebrew maintainers are so abrasive and despotic. So I'd like to spread the word about MacPorts as much as possible to help aid its uptake and let people know it's still alive and kicking :)

Anyway, thanks for all the help in fixing this issue! Looking forward to the new release.

George Plymale II <ylluminarious>
Fri 23 Aug 2019 11:43:10 PM UTC, comment #9: 

Ah, I put the flags in the wrong place.  However, I understand the underlying problem a bit better now.  -no-undefined in lib/Makefile.am and libdb/Makefile.am was effectively declaring a property that wasn't true due to the reference from lib/decompress.c to sandbox, and I was then trying to undo this manually for a single platform.  Not a good approach.

A much simpler solution is to just move lib/decompress.* to src/ and link it into each executable separately, rather than trying to have a library with an undefined reference in the first place, and I've done that.  There was a similar problem with a "database" symbol referred to by libmandb; that required a rather larger refactoring which I've been putting off for some time, but I've done that too.

Since I think this is all a step forward in any event, I've gone ahead and committed it to master, but I'd still like testing to confirm that my theory that this should fix the macOS build is correct.

I've replaced https://people.debian.org/~cjwatson/tmp/man-db-2.8.6.1+macosfix.tar.xz with a new tarball (SHA-256 add40ebe2b0b4e9d46000043c6e26fd321d711f38730836e3357a7087a660b2d).  If this all works then I expect to release 2.8.7 quite soon.

Colin Watson <cjwatson>
Group administrator
Thu 22 Aug 2019 09:48:28 PM UTC, comment #8: 

Thanks for the tarball. You were right, I just needed to run autoreconf and I also didn't have automake installed which obviously wasn't helping. However, now I have a new error which I've attached as well as my new Portfile. It seems this time there's some kind of linking error, since it's complaining about undefined symbols.

(file #47382, file #47383)

George Plymale II <ylluminarious>
Wed 21 Aug 2019 12:53:16 PM UTC, comment #7: 

You don't seem to have arranged to run autoreconf after applying this patch, so that probably explains why it didn't work.

I've uploaded https://people.debian.org/~cjwatson/tmp/man-db-2.8.6.1+macosfix.tar.xz for testing.  As the URL suggests, it's temporary and I'd rather you didn't republish it to MacPorts (as it still identifies itself as 2.8.6.1 and that might be confusing), but it should be good enough to confirm whether my fix works.

Colin Watson <cjwatson>
Group administrator
Mon 19 Aug 2019 01:05:26 PM UTC, comment #6: 

Sorry for the delayed response, had a hectic last week.

comment #4:

> Ah, I see the problem.  I inserted the "-undefined suppress" workaround for the strictness of the Darwin linker rather too early, and it suppressed undefined-symbol errors when configure was trying to test for whether symbols were defined, and so everything got catastrophically confused from there on in.
>
> Could you try the attached patch, please?  You'll need to run autoreconf after applying it; let me know if that isn't straightforward for you and I can put together an ad-hoc tarball.
>
> (file #47322)


Thanks for the info. I tried the attached patch and I made sure it was applied, but it didn't work. It appears there's still an error about windows.h. I hope I'm not doing something wrong. Perhaps that ad-hoc tarball is not a bad idea?

I've attached the log again so you can see what went wrong.

comment #5:

> Oh, in case you haven't already done so, it would be best to ensure that you remove your CFLAGS workaround as well before testing this patch.


Yes, I made sure to do this.

(file #47362)

George Plymale II <ylluminarious>
Sat 10 Aug 2019 11:19:22 PM UTC, comment #5: 

Oh, in case you haven't already done so, it would be best to ensure that you remove your CFLAGS workaround as well before testing this patch.

Colin Watson <cjwatson>
Group administrator
Sat 10 Aug 2019 11:18:28 PM UTC, comment #4: 

Ah, I see the problem.  I inserted the "-undefined suppress" workaround for the strictness of the Darwin linker rather too early, and it suppressed undefined-symbol errors when configure was trying to test for whether symbols were defined, and so everything got catastrophically confused from there on in.

Could you try the attached patch, please?  You'll need to run autoreconf after applying it; let me know if that isn't straightforward for you and I can put together an ad-hoc tarball.

(file #47322)

Colin Watson <cjwatson>
Group administrator
Sat 10 Aug 2019 09:01:43 PM UTC, comment #3: 

Oh shoot, I accidentally messed up my last comment and forgot to attach the file. Should be fixed now.

(file #47321)

George Plymale II <ylluminarious>
Sat 10 Aug 2019 09:00:20 PM UTC, comment #2: 

I've attached my config.log. Please let me know if you need anything else.

As far as SSH access to a macOS VM... I don't know of anything like that except for DistroTest. But that only works for Linux and BSD. I suppose you could try Darling, which is analogous to Wine for macOS programs.

According to their documentation, MacPorts should work so maybe you can have some luck there. Of course, I could always run stuff on my own machine of you want me to :)

Thanks for the tip about CFLAGS, I'll make sure to fix that.

George Plymale II <ylluminarious>
Sat 10 Aug 2019 02:00:26 PM UTC, comment #1: 

:info:configure checking for _set_invalid_parameter_handler... yes

Hmm, suspicious.  Could you attach config.log as well, please?  It might provide some clues.  (I have related suspicions about the volume of "implicit declaration" warnings here; they might just be library functions being in different header files on macOS, but they could also be the result of configure detecting library functions as existing when they really don't.)

Do you happen to know of any way I might be able to get access to SSH into a temporary macOS VM and try stuff out?

Also, you can drop the CFLAGS="-Wl,-flat_namespace,-undefined,suppress" workaround now - man-db's configure script does that itself as of 2.8.6.

Colin Watson <cjwatson>
Group administrator
Fri 09 Aug 2019 07:48:07 AM UTC, original submission:  

I'm the maintainer of the Portfile for man-db in MacPorts. I recently tried upgrading it to 2.8.6.1, but I'm getting a build error. The error which seems to be the showstopper appears to be coming from Gnulib.

It's complaining that <windows.h> is missing in macOS. Obviously, this is rather odd since, as Colin Watson pointed out in an email exchange, it shouldn't be going anywhere near <windows.h> on macOS.

I've attached the full compilation log as well as my current Portfile (basically a recipe to build a program in MacPorts).

George Plymale II <ylluminarious>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #47382:  new_error.log added by ylluminarious (61KiB - application/octet-stream)
file #47383:  Portfile.new added by ylluminarious (2KiB - application/octet-stream)
file #47362:  main.log added by ylluminarious (87KiB - application/octet-stream)
file #47322:  56734.patch added by cjwatson (1KiB - text/x-patch)
file #47321:  config.log added by ylluminarious (804KiB - application/octet-stream)
file #47309:  man-db_portfile_build_errors.log added by ylluminarious (80KiB - application/octet-stream)
file #47310:  Portfile added by ylluminarious (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by cjwatson (Posted a comment)
  • -email is unavailable- added by ylluminarious (Submitted the item)
  • -email is unavailable- added by ylluminarious
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 17 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-02-15 cjwatson Discussion LockNone Locked
    2024-02-15 ineiev Carbon-CopyRemoved 355136 -
    2024-02-15 ineiev Carbon-CopyRemoved 335004 -
    2019-08-26 cjwatson StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2019-08-22 ylluminarious Attached File- Added new_error.log, #47382
        Attached File- Added Portfile.new, #47383
    2019-08-19 ylluminarious Attached File- Added main.log, #47362
    2019-08-10 cjwatson Attached File- Added 56734.patch, #47322
        Severity3 - Normal 4 - Important
        StatusNeed Info In Progress
        Assigned toNone cjwatson
    2019-08-10 ylluminarious Attached File- Added config.log, #47321
    2019-08-10 cjwatson StatusNone Need Info
    2019-08-09 ylluminarious Attached File- Added man-db_portfile_build_errors.log, #47309
        Attached File- Added Portfile, #47310
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code