Bug 232571 - lang/libobjc2: fails to install
Summary: lang/libobjc2: fails to install
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: David Chisnall
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-23 21:29 UTC by rm
Modified: 2019-07-10 03:30 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (theraven)


Attachments
Makefile diff (598 bytes, patch)
2019-07-10 03:29 UTC, b0cspa
no flags Details | Diff
plist for modified make (1.18 KB, video/mp2t)
2019-07-10 03:30 UTC, b0cspa
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description rm 2018-10-23 21:29:02 UTC
===>  Installing for libobjc2-1.8.1_2
===>   Registering installation for libobjc2-1.8.1_2
pkg-static: Unable to access file /usr/ports/lang/libobjc2/work/stage/usr/local/include/objc/Availability.h:No such file or directory
pkg-static: Unable to access file /usr/ports/lang/libobjc2/work/stage/usr/local/include/objc/Object.h:No such file or directory
pkg-static: Unable to access file /usr/ports/lang/libobjc2/work/stage/usr/local/include/objc/Protocol.h:No such file or directory
pkg-static: Unable to access file /usr/ports/lang/libobjc2/work/stage/usr/local/include/objc/blocks_private.h:No such file or directory
pkg-static: Unable to access file /usr/ports/lang/libobjc2/work/stage/usr/local/include/objc/blocks_runtime.h:No such file or directory
pkg-static: Unable to access file /usr/ports/lang/libobjc2/work/stage/usr/local/include/objc/capabilities.h:No such file or directory
pkg-static: Unable to access file /usr/ports/lang/libobjc2/work/stage/usr/local/include/objc/developer.h:No such file or directory
pkg-static: Unable to access file /usr/ports/lang/libobjc2/work/stage/usr/local/include/objc/encoding.h:No such file or directory
pkg-static: Unable to access file /usr/ports/lang/libobjc2/work/stage/usr/local/include/objc/hooks.h:No such file or directory
pkg-static: Unable to access file /usr/ports/lang/libobjc2/work/stage/usr/local/include/objc/message.h:No such file or directory
pkg-static: Unable to access file /usr/ports/lang/libobjc2/work/stage/usr/local/include/objc/objc-api.h:No such file or directory
pkg-static: Unable to access file /usr/ports/lang/libobjc2/work/stage/usr/local/include/objc/objc-arc.h:No such file or directory
pkg-static: Unable to access file /usr/ports/lang/libobjc2/work/stage/usr/local/include/objc/objc-auto.h:No such file or directory
pkg-static: Unable to access file /usr/ports/lang/libobjc2/work/stage/usr/local/include/objc/objc.h:No such file or directory
pkg-static: Unable to access file /usr/ports/lang/libobjc2/work/stage/usr/local/include/objc/runtime.h:No such file or directory
pkg-static: Unable to access file /usr/ports/lang/libobjc2/work/stage/usr/local/include/objc/runtime-deprecated.h:No such file or directory
pkg-static: Unable to access file /usr/ports/lang/libobjc2/work/stage/usr/local/include/objc/slot.h:No such file or directory
pkg-static: Unable to access file /usr/ports/lang/libobjc2/work/stage/usr/local/lib/libobjc.so:No such file or directory
pkg-static: Unable to access file /usr/ports/lang/libobjc2/work/stage/usr/local/lib/libobjc.so.4.6:No such file or directory
*** Error code 74

Stop.
make[1]: stopped in /usr/ports/lang/libobjc2
*** Error code 1
Comment 1 Nathan 2018-10-24 00:31:19 UTC
I tried to reproduce this error on 12-current. Both in poudriere and host. Which version and arch are you using?
Comment 2 rm 2018-11-17 15:40:20 UTC
Uname -a:
FreeBSD faramir 11.2-RELEASE-p4 FreeBSD 11.2-RELEASE-p4 #0: Thu Sep 27 08:16:24 UTC 2018     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

Currently installed version (the last one which installed)
libobjc2-1.8.1_1               Replacement Objective-C runtime supporting modern Objective-C features

I did update pkg several times, I was able to update all packages except this one.
--->  Listing the results (+:done / -:ignored / *:skipped / !:failed)
        ! lang/libobjc2 (libobjc2-1.8.1_1)      (install error)
--->  Packages processed: 0 done, 0 ignored, 0 skipped and 1 failed


It fails the same way if I let portupgrade clean the previous package, but also if I repeat (-w option)

I can check what files are there:
% ls /usr/ports/lang/libobjc2/work/stage/usr/local/lib
X11             debug           libobjc.so.4

So, indeed
pkg-static: Unable to access file /usr/ports/lang/libobjc2/work/stage/usr/local/lib/libobjc.so:No such file or directory
pkg-static: Unable to access file /usr/ports/lang/libobjc2/work/stage/usr/local/lib/libobjc.so.4.6:No such file or directory

are missing! if this is correct or not, I don't know, but the error is "right".

All headers are missing too, e.g.
% ls /usr/ports/lang/libobjc2/work/stage/usr/local/include/

shows X11! nothing else.

As a brute-force test, I tried even
 rm -rf /usr/ports/lang/libobjc2/work

and letting it build again. No help.
Comment 3 rm 2018-11-17 16:02:36 UTC
I noticed that during build I see this:
===>   Generating temporary packing list
[0/1] cd /usr/ports/lang/libobjc2/work/libobjc2-1.8.1 && /usr/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
-- Install configuration: "Release"
-- Installing: /usr/ports/lang/libobjc2/work/stage/System/Library/Libraries/libobjc.so.4.6
-- Installing: /usr/ports/lang/libobjc2/work/stage/System/Library/Libraries/libobjc.so
-- Installing: /usr/ports/lang/libobjc2/work/stage/System/Library/Headers/objc/Availability.h
-- Installing: /usr/ports/lang/libobjc2/work/stage/System/Library/Headers/objc/Object.h
-- Installing: /usr/ports/lang/libobjc2/work/stage/System/Library/Headers/objc/Protocol.h
-- Installing: /usr/ports/lang/libobjc2/work/stage/System/Library/Headers/objc/blocks_private.h
-- Installing: /usr/ports/lang/libobjc2/work/stage/System/Library/Headers/objc/blocks_runtime.h
-- Installing: /usr/ports/lang/libobjc2/work/stage/System/Library/Headers/objc/capabilities.h
-- Installing: /usr/ports/lang/libobjc2/work/stage/System/Library/Headers/objc/developer.h
-- Installing: /usr/ports/lang/libobjc2/work/stage/System/Library/Headers/objc/encoding.h
-- Installing: /usr/ports/lang/libobjc2/work/stage/System/Library/Headers/objc/hooks.h
-- Installing: /usr/ports/lang/libobjc2/work/stage/System/Library/Headers/objc/message.h
-- Installing: /usr/ports/lang/libobjc2/work/stage/System/Library/Headers/objc/objc-api.h
-- Installing: /usr/ports/lang/libobjc2/work/stage/System/Library/Headers/objc/objc-arc.h
-- Installing: /usr/ports/lang/libobjc2/work/stage/System/Library/Headers/objc/objc-auto.h
-- Installing: /usr/ports/lang/libobjc2/work/stage/System/Library/Headers/objc/objc.h
-- Installing: /usr/ports/lang/libobjc2/work/stage/System/Library/Headers/objc/runtime-deprecated.h
-- Installing: /usr/ports/lang/libobjc2/work/stage/System/Library/Headers/objc/runtime.h
-- Installing: /usr/ports/lang/libobjc2/work/stage/System/Library/Headers/objc/slot.h
/bin/ln -sf libobjc.so.4.6 /usr/ports/lang/libobjc2/work/stage/usr/local/lib/libobjc.so.4

which are exactly the files looked for 
/usr/ports/lang/libobjc2/work/stage/usr/local

this sounds buggy!
Comment 4 David Chisnall freebsd_committer 2018-11-19 14:53:05 UTC
This is a good example of why it's a bad idea to build ports outside of Poudriere.  The libobjc2 cmake is picking up your GNUstep configuration and setting itself up to install inside a GNUstep install.  This doesn't happen when you do a build with Poudriere because it sanitises your environment and you don't get leaks from anything that wasn't installed as a dependency.

I'm closing the bug because I don't think that we support building ports outside of Poudriere anymore.  If we do, I'm happy to review a patch to explicitly tell CMake to ignore any GNUstep config that it finds.
Comment 5 b0cspa 2019-07-10 03:29:45 UTC
Created attachment 205643 [details]
Makefile diff

Adds flavor gnustep to libobjc2
Comment 6 b0cspa 2019-07-10 03:30:57 UTC
Created attachment 205644 [details]
plist for modified make

Add flavor gnustep to libobjc2