You are not logged in.
Pages: 1
Hi forum,
I am a c++ newbie, and I want to be able to run `make` as a regular user to compile binaries to my $HOME dir. Right now I need to `sudo make` in order to do so, which trips up my vim workflow. Is there any way to change permissions or something to that effect in order to get this working?
EDIT: In order for openframeworks to work as advertised I needed to download the build files from the website, not from AUR....
Last edited by kflak (2020-01-30 11:12:27)
Offline
You can run make as your regular user, unless you screwed your permissions by inadvertently running sudo make initially without needing to.
So picture-book case of an XY problem... What exactly are you doing? What are you compiling, where are you compiling? From the directory you run make in what are the outputs of
pwd
ls -laOffline
I may very well have screwed my permissions...
pwd
/home/kf/of/of_v20191015_linux64gcc6_release/apps/myApps/017_ofxgui
ls -la
total 148
drwxr-xr-x 3 kf kf 4096 Jan 29 16:45 .
drwxr-xr-x 13 kf kf 4096 Jan 29 16:42 ..
-rw-r--r-- 1 kf kf 7 Jan 29 16:45 addons.make
-rw-r--r-- 1 kf kf 6504 Jan 29 16:42 config.make
-rw-r--r-- 1 kf kf 114064 Jan 29 16:42 emptyExample.png
-rw-r--r-- 1 kf kf 2433 Jan 29 16:42 emptyExample.qbs
-rw-r--r-- 1 kf kf 391 Jan 29 16:42 Makefile
-rw-r--r-- 1 kf kf 1056 Jan 29 16:42 README.md
drwxr-xr-x 2 kf kf 4096 Jan 30 09:17 srcEDIT: It's an openframeworks project
Last edited by kflak (2020-01-30 09:08:26)
Offline
You probably shouldn't be using frameworks like this that set up overly complex structures while not knowing what they are doing, while learning... I took a look and assuming you didn't actively change anything it should use ../../.. as it's logical root, did you extract the tar.gz archive as root? check that path. Maybe throw in
printenvas well, maybe post the makefile and the config.make addons.make. Where do the binaries end up in? Check these files they shouldn't be owned by root. And FWIW maybe a sudo make run
Last edited by V1del (2020-01-30 09:43:02)
Offline
Would love to learn the stuff I need for my next performances from scratch, but unfortunately time is a factor... I tried reinstalling oF from AUR and compiling a bare-bones example project, but still getting the permissions problem.
/bin/sh: /opt/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Release/.compiler_flags: Permission denied
make[2]: *** [makefileCommon/compile.core.mk:233: /opt/openFrameworks/libs/openFrameworksCompiled/lib/linux64/obj/Release/.compiler_flags] Error 1
make[1]: *** [makefileCommon/compile.core.mk:204: Release] Error 2
make[1]: Leaving directory '/opt/openFrameworks/libs/openFrameworksCompiled/project'
make: *** [/opt/openFrameworks/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:125: Release] Error 2Not sure anymore if this is an Arch issue or an oF issue...
Offline
cat Makefile
# Attempt to load a config.make file.
# If none is found, project defaults in config.project.make will be used.
ifneq ($(wildcard config.make),)
include config.make
endif
# make sure the the OF_ROOT location is defined
ifndef OF_ROOT
OF_ROOT=$(realpath ../../..)
endif
# call the project makefile!
include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mkOffline
printenv
DISPLAY=:0
LANG=en_US.UTF-8
AUTOJUMP_SOURCED=1
SWAYSOCK=/run/user/1000/sway-ipc.1000.266591.sock
WAYLAND_DISPLAY=wayland-0
PG_OF_PATH=/home/kf/of-workspace
USER=kf
HOME=/home/kf
AUTOJUMP_ERROR_PATH=/home/kf/.local/share/autojump/errors.log
MATES_DIR=/home/kf/.contacts/woelkli/contacts
BASE16_THEME=base16-tomorrow
OLDPWD=/home/kf
MOZ_ENABLE_WAYLAND=1
WINEARCH=win32
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
XDG_VTNR=1
XDG_SEAT=seat0
I3SOCK=/run/user/1000/sway-ipc.1000.266591.sock
_=/usr/bin/printenv
BROWSER=/usr/bin/qutebrowser
VTE_VERSION=5602
PROMPT_EOL_MARK=
JOURNAL_STREAM=9:755766
MAIL=/var/spool/mail/kf
LOGNAME=kf
VISUAL=nvim
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/kf/.gem/ruby/2.7.0/bin:/home/kf/.gem/ruby/2.6.0/bin:/home/kf/.gem/ruby/2.5.0/bin:/home/kf/bin:/usr/lib/python2.7:/usr/lib/python3.7:/home/kf/go/bin:/home/kf/of-workspace:/opt/:/home/kf/.gem/ruby/2.7.0/bin:/home/kf/.gem/ruby/2.6.0/bin:/home/kf/.gem/ruby/2.5.0/bin:/home/kf/bin:/usr/lib/python2.7:/usr/lib/python3.7:/home/kf/go/bin:/home/kf/of
LC_CTYPE=en_US.UTF-8
XDG_RUNTIME_DIR=/run/user/1000
XDG_SESSION_ID=3
SHELL=/usr/bin/zsh
XDG_SESSION_TYPE=tty
WINEPREFIX=/home/kf/win32
EDITOR=nvim
INVOCATION_ID=af562f5b7f934f1b8afbe24f3292d167
SHLVL=2
PWD=/home/kf/of-workspace/apps/myApps/emptyExample
MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins
COLORTERM=truecolor
XCURSOR_SIZE=24
TERM=xterm-termite
XDG_SESSION_CLASS=user
LESS_TERMCAP_mb=[1;32m
LESS_TERMCAP_md=[1;32m
LESS_TERMCAP_me=[0m
LESS_TERMCAP_se=[0m
LESS_TERMCAP_so=[01;33m
LESS_TERMCAP_ue=[0m
LESS_TERMCAP_us=[1;4;31mOffline
kflak, please do not serial post (post several times in a row with no replies in between). If no one has replied, edit your original post to add information.
Offline
@2ManyDogs, thanks for the pointer!
Offline
Pages: 1