Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how to compile objective-c
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
rzdndr
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2024
Posts: 77

PostPosted: Sat Aug 03, 2024 12:06 pm    Post subject: how to compile objective-c Reply with quote

Hello

How is it possible to enable objc for gcc? Do I need to add the flag objc to make.conf to do that and emerge to update the gcc compiler suite?

Regards
Back to top
View user's profile Send private message
Banana
Moderator
Moderator


Joined: 21 May 2004
Posts: 1619
Location: Germany

PostPosted: Sat Aug 03, 2024 1:36 pm    Post subject: Reply with quote

As described at the https://wiki.gentoo.org/wiki/GCC wiki page, the useflag objc https://packages.gentoo.org/useflags/objc will enable the support.

Also think about wher to put your useflags: https://wiki.gentoo.org/wiki/Handbook:AMD64/Working/USE#Using_USE_flags
_________________
Forum Guidelines

PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire
Back to top
View user's profile Send private message
rzdndr
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2024
Posts: 77

PostPosted: Sat Aug 03, 2024 2:17 pm    Post subject: Reply with quote

Banana wrote:
As described at the https://wiki.gentoo.org/wiki/GCC wiki page, the useflag objc https://packages.gentoo.org/useflags/objc will enable the support.

Also think about wher to put your useflags: https://wiki.gentoo.org/wiki/Handbook:AMD64/Working/USE#Using_USE_flags


I am thinking that I will be using objc with gcc, I would put these in the /etc/portage/make.conf, since it should be global on the system. Would this be correct?

Edit: On second thought, I can put this into the package.use for gcc. That might be more appropriate.
Back to top
View user's profile Send private message
Banana
Moderator
Moderator


Joined: 21 May 2004
Posts: 1619
Location: Germany

PostPosted: Sun Aug 04, 2024 7:23 am    Post subject: Reply with quote

rzdndr wrote:
Banana wrote:
As described at the https://wiki.gentoo.org/wiki/GCC wiki page, the useflag objc https://packages.gentoo.org/useflags/objc will enable the support.

Also think about wher to put your useflags: https://wiki.gentoo.org/wiki/Handbook:AMD64/Working/USE#Using_USE_flags


I am thinking that I will be using objc with gcc, I would put these in the /etc/portage/make.conf, since it should be global on the system. Would this be correct?

Edit: On second thought, I can put this into the package.use for gcc. That might be more appropriate.


Start with the package.use. If you need a useflag for a lot of packages, put it into make.conf. You can check the effects of the useflag by setting it first into make.conf and run emerge -uUDpv @world
_________________
Forum Guidelines

PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire
Back to top
View user's profile Send private message
rzdndr
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2024
Posts: 77

PostPosted: Sun Aug 04, 2024 7:33 am    Post subject: Reply with quote

Banana wrote:
rzdndr wrote:
Banana wrote:
As described at the https://wiki.gentoo.org/wiki/GCC wiki page, the useflag objc https://packages.gentoo.org/useflags/objc will enable the support.

Also think about wher to put your useflags: https://wiki.gentoo.org/wiki/Handbook:AMD64/Working/USE#Using_USE_flags


I am thinking that I will be using objc with gcc, I would put these in the /etc/portage/make.conf, since it should be global on the system. Would this be correct?

Edit: On second thought, I can put this into the package.use for gcc. That might be more appropriate.


Start with the package.use. If you need a useflag for a lot of packages, put it into make.conf. You can check the effects of the useflag by setting it first into make.conf and run emerge -uUDpv @world


Would it be possible to use USE="gcc" emerge -uUDpv @world first? After that put these into /etc/portage/package.use or /etc/portage/make.conf.
Back to top
View user's profile Send private message
Banana
Moderator
Moderator


Joined: 21 May 2004
Posts: 1619
Location: Germany

PostPosted: Sun Aug 04, 2024 7:49 am    Post subject: Reply with quote

yes, this would be also a possibility to test it.
_________________
Forum Guidelines

PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2164

PostPosted: Sun Aug 04, 2024 8:04 am    Post subject: Reply with quote

This is more of a general advice - inspect carefully emerge output when putting USE on the command line. Sometimes unexpected options may be enabled on unexpected packages.

Best Regards,
Georgi
Back to top
View user's profile Send private message
rzdndr
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2024
Posts: 77

PostPosted: Sun Aug 04, 2024 8:13 am    Post subject: Reply with quote

Banana wrote:
yes, this would be also a possibility to test it.


Thank you
Back to top
View user's profile Send private message
rzdndr
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2024
Posts: 77

PostPosted: Sun Aug 04, 2024 8:15 am    Post subject: Reply with quote

logrusx wrote:
This is more of a general advice - inspect carefully emerge output when putting USE on the command line. Sometimes unexpected options may be enabled on unexpected packages.

Best Regards,
Georgi


I should not see any packages other than gcc and packages where this flag is used. I think they are used in

Code:
dev-lang/gnat-gpl   Build support for the Objective C code language
sys-devel/gcc   Build support for the Objective C code language
sys-devel/gcc-apple   Build support for the Objective C code language


Other than that would tell me that there is something wrong, correct?
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2164

PostPosted: Sun Aug 04, 2024 9:35 am    Post subject: Reply with quote

You just watch for something that doesn't add up, that's it. Generally you won't have problems, but sometimes it might enable entries that are disabled in package.use. AFAIK USE on command line will override other configurations including from make.conf.

Best Regards,
Georgi
Back to top
View user's profile Send private message
rzdndr
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2024
Posts: 77

PostPosted: Sun Aug 04, 2024 10:09 am    Post subject: Reply with quote

logrusx wrote:
You just watch for something that doesn't add up, that's it. Generally you won't have problems, but sometimes it might enable entries that are disabled in package.use. AFAIK USE on command line will override other configurations including from make.conf.

Best Regards,
Georgi


I am thinking that use flag on the command line will modify the global use flags that I have on my system. If I do not have that flag, it will be added, if it is defined, then it will be modified (based on whether it is disabled or enabled).

I remember reading something in the handbook that the usage on the command line is for just that command only.

Edit: The link to that portion of the handbook. https://wiki.gentoo.org/wiki/Handbook:X86/Working/USE#Declaring_temporary_USE_flags

Thank you.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2164

PostPosted: Sun Aug 04, 2024 10:40 am    Post subject: Reply with quote

rzdndr wrote:

I remember reading something in the handbook that the usage on the command line is for just that command only.


That's correct. If you need to preserve it you need to add it to package.use. What I meant is it'll override even the value in make.conf for the invocation of that command. Not sure about the profile, I think the profile is the highest priority and you can't override it like that.

Best Regards,
Georgi
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4842
Location: Bavaria

PostPosted: Sun Aug 04, 2024 10:47 am    Post subject: Reply with quote

logrusx wrote:
[...] the profile is the highest priority and you can't override it like that.

No. You can (and sometimes must) override every Use-flag coming from the profile. This is particularly necessary if you don't need some things and therefore want to switch them off. In my make.conf I have more use-flags deselected than added :lol: =>
Code:
USE="-accessibility -bluetooth -gstreamer -gtk -gtk3 -haptic -initramfs -ipv6 -lvm -modemmanager -networkmanager -phonon -ppp -pulseaudio -screencast -semantic-desktop -thin -thumbnail -wext -wifi -wireless "
USE="$USE jumbo-build lm-sensors matroska openexr opus theora threads vaapi vpx webp"

_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
rzdndr
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2024
Posts: 77

PostPosted: Sun Aug 04, 2024 10:59 am    Post subject: Reply with quote

logrusx wrote:
rzdndr wrote:

I remember reading something in the handbook that the usage on the command line is for just that command only.


That's correct. If you need to preserve it you need to add it to package.use. What I meant is it'll override even the value in make.conf for the invocation of that command. Not sure about the profile, I think the profile is the highest priority and you can't override it like that.

Best Regards,
Georgi


Yes to preserve I will either add this to the /etc/portage/make.conf, or to the package based /etc/portage/package.use. The command line item is for testing purposes, see what packages will require updates.

Regards
Back to top
View user's profile Send private message
rzdndr
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2024
Posts: 77

PostPosted: Sun Aug 04, 2024 11:09 am    Post subject: Reply with quote

pietinger wrote:
logrusx wrote:
[...] the profile is the highest priority and you can't override it like that.

No. You can (and sometimes must) override every Use-flag coming from the profile. This is particularly necessary if you don't need some things and therefore want to switch them off. In my make.conf I have more use-flags deselected than added :lol: =>
Code:
USE="-accessibility -bluetooth -gstreamer -gtk -gtk3 -haptic -initramfs -ipv6 -lvm -modemmanager -networkmanager -phonon -ppp -pulseaudio -screencast -semantic-desktop -thin -thumbnail -wext -wifi -wireless "
USE="$USE jumbo-build lm-sensors matroska openexr opus theora threads vaapi vpx webp"


Yes. In the document https://wiki.gentoo.org/wiki/Handbook:AMD64/Working/USE#Precedence.

The make.defaults is from your profile I believe. And these can be overriden by the ones that follow in that list.
Back to top
View user's profile Send private message
rzdndr
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2024
Posts: 77

PostPosted: Sun Aug 04, 2024 1:39 pm    Post subject: Reply with quote

Would a USE="objc" emerge -uNDpv @world trigger a rebuild. Or should the -U flag be used in emerge?
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4842
Location: Bavaria

PostPosted: Sun Aug 04, 2024 1:46 pm    Post subject: Reply with quote

rzdndr wrote:
Would a USE="objc" emerge -uNDpv @world trigger a rebuild. Or should the -U flag be used in emerge?

You will need the U-flag always when you change (=add or deselect) some use-flags ... so, you need it when you only CHECK something with "emerge -..p @world" and you need it also when you do the change (without -p).

You already know that a change of the used use-flags on the command line is only valid for this emerge and for a permanent change you have to enter it in make.conf or /usr/portage/package.use (but it doesn't matter if you first enter a "USE=... emerge" first and then write it away permanently, or whether you first write the changes permanently and then just do a simple "emerge" ... but you ALWAYS need the -U).

The -N is necessary for every changed use-flag ... even for those that you don't use at all ... just take a look at the differences and you'll see that you hardly ever need the -N.


P.S.: I have updated my system before some hours ... and these are the outputs of my system:
Code:

 /usr/src # emerge -uUDvp @world

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 8.21 s (backtrack: 0/20).


Total: 0 packages, Size of downloads: 0 KiB



 /usr/src # emerge -uNDvp @world

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 7.61 s (backtrack: 0/20).

[ebuild   R    ] dev-perl/Regexp-IPv6-0.30.0-r2::gentoo  USE="-test" PERL_FEATURES="(-debug) -ithreads% -quadmath%" 0 KiB
[ebuild   R    ] perl-core/File-Temp-0.231.100::gentoo  PERL_FEATURES="(-debug) -ithreads% -quadmath%" 0 KiB
[ebuild   R    ] dev-perl/Socket6-0.290.0::gentoo  USE="-test" PERL_FEATURES="(-debug) -ithreads% -quadmath%" 0 KiB

....

[ebuild   R    ] dev-qt/qtbase-6.7.2-r1:6/6.7.2::gentoo  USE="X concurrent cups dbus gui icu libinput libproxy network nls opengl sql sqlite ssl udev vulkan wayland widgets xml (zstd) -accessibility -brotli -eglfs -evdev -gles2-only -gssapi -gtk -journald% -mysql -oci8 -odbc -postgres -renderdoc -sctp -syslog% -test -tslib" 0 KiB

Total: 47 packages (47 reinstalls), Size of downloads: 0 KiB

Yes, you dont need -N ... just wait until some of them must be updated regularly.
_________________
https://wiki.gentoo.org/wiki/User:Pietinger


Last edited by pietinger on Sun Aug 04, 2024 1:54 pm; edited 1 time in total
Back to top
View user's profile Send private message
rzdndr
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2024
Posts: 77

PostPosted: Sun Aug 04, 2024 1:54 pm    Post subject: Reply with quote

pietinger wrote:
rzdndr wrote:
Would a USE="objc" emerge -uNDpv @world trigger a rebuild. Or should the -U flag be used in emerge?

You will need the U-flag always when you change (=add or deselect) some use-flags ... so, you need it when you only CHECK something with "emerge -..p @world" and you need it also when you do the change (without -p).

You already know that a change of the used use-flags on the command line is only valid for this emerge and for a permanent change you have to enter it in make.conf or /usr/portage/package.use (but it doesn't matter if you first enter a "USE=... emerge" first and then write it away permanently, or whether you first write the changes permanently and then just do a simple "emerge" ... but you ALWAYS need the -U).

The -N is necessary for every changed use-flag ... even for those that you don't use at all ... just take a look at the differences and you'll see that you hardly ever need the -N.


I was worried that it might have triggered a reinstall with the N flag. Since it is taking time to build GCC. There is a typo, I have an -a in place of -p.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4842
Location: Bavaria

PostPosted: Sun Aug 04, 2024 1:57 pm    Post subject: Reply with quote

rzdndr wrote:
I was worried that it might have triggered a reinstall with the N flag. Since it is taking time to build GCC. There is a typo, I have an -a in place of -p.

If you want a re-install try "-e" (... of course together with -p pretend) ... -a will ask you (so both are nearly the same). "man emerge" will help you surely.
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum