Permission denied
-
Hi All,
I'm attempting to setup a tool chain so I can create and debug applications on a Beaglebone Black and I'm having some troubles with Qt Creator. My host machine is Ubuntu 12.04 running on VirtualBox 4.3. I used the procedure outlined on http://embedded.von-kannen.net/ to download, configure, and build QtCreator. For the most part everything well until I got to the part were Qt was being installed into* /opt/qt-arm *and I got a permission error. It wouldn’t allow me to to make the qt-arm folder and subfolders in /opt. No problem, I just prepended “sudo make” and everything appears to have worked fine.
I was able to start Qt Creator and make a simple Hello World app. The problem is, when I goto build the app. I get a "execvp: /opt/qt-arm/bin/uic: Permission denied" message. I'm not sure what to do next.
Regards,
Mark -
Hi and welcome to devnet,
What are the rights on uic ?
-
What happens if you call that uic version by hand ?
Same question if you pass it the file that should be processed when it fails ? -
I get a "command not found". There is an executable there "uic".
Here is a screen shot of the compiler output. Hanson1 == Helloworld.Compile Output
16: 12 : 50: Running steps for proj ect Hansonl..
16: 12 : 50: Configuration unchanged, skipping qmake step.
16: 12 : 50: Starting:
" / us r/ bin/ make"
/ opt/ qt - a rm/bin/uic
'Hanson ui -0 ui mainwindow. h
make: execvp: /opt/qt-a rm/bin/uic: Permission denied
make: Iui mainwindow . h J Error 127
16: 12 : 50: The process "/usr/bin/make" exited with code 2 .
Error while building/deploying project Hansonl (kit: BeagleBone Black)
When executing step 'Make
16: 12 :so: Elapsed time: ee:oo. -
The command not found is not surprising. However I wanted to know what happened if you called
@/opt/qt-arm/uic@
using the full path
-
Checking the PATH shows that /opt/qt-arm/bin/uic/ is include. When I exec "./opt/qt-arm/bin/uic/uic" I get bash: ./opt/qt-arm/bin/uic/uic: No such file or directory".
When I exec uic with a file from the command line, and I'm not sure it's the correct one. I get what looks like a generated .cpp file echoed to the console. The command I gave it was:" /opt/qt-arm/bin/uic/uic ~/qt-bbb/projects/Hanson1/mainwindow.ui".
-
Ok, It's still not working but I have some more clues.
I now understand that uic is used to auto generate code from the project. When I run the following: uic mainwindow.ui -o ui_mainwindow.h. The files mainwindow.cpp and ui_mainwindow.h get generated. I can individually build main.cpp and mainwindow.cpp from the IDE without error, but if I try and build the entire project, I get the error.
I'm guessing that the problem is a pathing issue???
-
@/opt/qt-arm/bin/uic/uic@
Doesn't make sense, it should be
@/opt/qt-arm/bin/uic@
-
Good, so what happens if you call that one by hand
-
when I "cd /opt/qt-arm/bin/uic" and and execute just "uic" with no parameters, I get the follwing: The program 'uic' can be found in the following packages" * libqt4-dev * qt3-dev-tools Try: sudo apt-get install <selected package>
If I execute "uic mainwindow.ui", ui_mainwindow.h is echoed to the terminal screen.
-
Being in the same folder is not enough, you have to call it like that:
@./uic@
-
My apologies, miss type. The actual call was “./uic /home/mark/qt-bbb/projects/Hanson1/mainwindow.ui”, but the result was still the same, ui_mainwindow.h was still echoed to the terminal.
if I exec just "./uic" from the /opt/qt-arm/bin/uic folder, the command appears to be doing something but never comes back. I have to kill it to get my terminal back.
-
Ok, there might be a misunderstanding on what you are expecting vs what happens. When calling uic without other parameter than the ui file you get the header on stdout, if you want it in a file, you have to add the -o argument.
Anyway, that shows that you can run uic without any problem.
So we're back to your original problem.
Now, let's see if you have the same problem on the command line.
Create a folder to build your project (outside your source tree) then call@cd build_dir
/opt/qt-arm/bin/qmake /path/to/your/project
make@Do you have the same problematic behavior ?
-
can you run qmake with -d ? See if you can get some more information about that permission denied error. If one -d is not enough you can increase the number e.g. -d -d -d will be very verbose
-
I've included part of the output from qmake with -d -d parameter set. If this isn't enoungh from the logfile I can add more.
@DEBUG 2: EscapeFilePath: first -> first
DEBUG 2: EscapeFilePath: check -> check
DEBUG 2: EscapeFilePath: check -> check
DEBUG 2: EscapeFilePath: check -> check
DEBUG 2: EscapeFilePath: check -> check
DEBUG 2: EscapeFilePath: compiler_moc_header_clean -> compiler_moc_header_clean
DEBUG 2: EscapeFilePath: compiler_moc_source_clean -> compiler_moc_source_clean
DEBUG 2: EscapeFilePath: mocclean -> mocclean
DEBUG 2: EscapeFilePath: mocclean -> mocclean
DEBUG 2: EscapeFilePath: mocclean -> mocclean
DEBUG 2: EscapeFilePath: mocclean -> mocclean
DEBUG 2: EscapeFilePath: compiler_moc_header_make_all -> compiler_moc_header_make_all
DEBUG 2: EscapeFilePath: compiler_moc_source_make_all -> compiler_moc_source_make_all
DEBUG 2: EscapeFilePath: mocables -> mocables
DEBUG 2: EscapeFilePath: mocables -> mocables
DEBUG 2: EscapeFilePath: mocables -> mocables
DEBUG 2: EscapeFilePath: mocables -> mocables
DEBUG 2: EscapeFilePath: ${QMAKE_FUNC_mocCmdBase} -> ${QMAKE_FUNC_mocCmdBase}
DEBUG 2: EscapeFilePath: moc_mainwindow.cpp -> moc_mainwindow.cpp
DEBUG 2: EscapeFilePath: ../qt-bbb/projects/test1/mainwindow.h -> ../qt-bbb/projects/test1/mainwindow.h
DEBUG 1: Running project test: isEmpty(WIN_INCLUDETEMP) [19]
DEBUG 1: Project Parser: /opt/qt-arm/mkspecs/features/moc.prf:43 : Test (!isEmpty(WIN_INCLUDETEMP)) failed.
DEBUG 1: Project Parser: /opt/qt-arm/mkspecs/features/moc.prf:43 : Entering block 2 (1). [!isEmpty(WIN_INCLUDETEMP) {]
DEBUG 1: Project Parser: /opt/qt-arm/mkspecs/features/moc.prf:44 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/qt-arm/mkspecs/features/moc.prf:45 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/qt-arm/mkspecs/features/moc.prf:46 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/qt-arm/mkspecs/features/moc.prf:47 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/qt-arm/mkspecs/features/moc.prf:48 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/qt-arm/mkspecs/features/moc.prf:49 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/qt-arm/mkspecs/features/moc.prf:50 : Leaving block 2
DEBUG 1: Project Parser: /opt/qt-arm/mkspecs/features/moc.prf:50 : Ignored due to block being false.
DEBUG 2: Project Parser [var replace]: $$QMAKE_MOC -> QMAKE_MOC
DEBUG 1: Running project expand: join(QMAKE_COMPILER_DEFINES:: -D::-D) [9]
DEBUG 2: Project Parser [var replace]: $$join(QMAKE_COMPILER_DEFINES, " -D", -D) -> join
DEBUG 1: Running project test: return(/opt/qt-arm/bin/moc $(DEFINES) $(INCPATH)) [12]
DEBUG 2: EscapeFilePath: ../qt-bbb/projects/test1/mainwindow.h -> ../qt-bbb/projects/test1/mainwindow.h
DEBUG 2: EscapeFilePath: moc_mainwindow.cpp -> moc_mainwindow.cpp
DEBUG 2: EscapeFilePath: ../qt-bbb/projects/test1/mainwindow.h -> ../qt-bbb/projects/test1/mainwindow.h
DEBUG 2: EscapeFilePath: moc_mainwindow.cpp -> moc_mainwindow.cpp
DEBUG 2: EscapeFilePath: moc_mainwindow.cpp -> moc_mainwindow.cpp
DEBUG 2: EscapeFilePath: moc_mainwindow.cpp -> moc_mainwindow.cpp
DEBUG 2: EscapeFilePath: moc_mainwindow.cpp -> moc_mainwindow.cpp
DEBUG 2: EscapeFilePath: /opt/qt-arm/bin/rcc -> /opt/qt-arm/bin/rcc
DEBUG 2: EscapeFilePath: /opt/qt-arm/bin/rcc -> /opt/qt-arm/bin/rcc
DEBUG 2: EscapeFilePath: /home/mark/build_dir -> /home/mark/build_dir
DEBUG 2: EscapeFilePath: /opt/qt-arm/bin/uic3 -> /opt/qt-arm/bin/uic3
DEBUG 2: EscapeFilePath: qmake_image_collection.cpp -> qmake_image_collection.cpp
DEBUG 2: EscapeFilePath: ${QMAKE_FUNC_mocCmdBase} -> ${QMAKE_FUNC_mocCmdBase}
DEBUG 2: EscapeFilePath: /opt/qt-arm/bin/uic -> /opt/qt-arm/bin/uic
DEBUG 2: EscapeFilePath: /opt/qt-arm/bin/uic -> /opt/qt-arm/bin/uic
DEBUG 2: EscapeFilePath: /home/mark/build_dir -> /home/mark/build_dir
DEBUG 2: EscapeFilePath: ui_mainwindow.h -> ui_mainwindow.h
DEBUG 2: EscapeFilePath: ../qt-bbb/projects/test1/mainwindow.ui -> ../qt-bbb/projects/test1/mainwindow.ui
DEBUG 2: EscapeFilePath: ../qt-bbb/projects/test1/mainwindow.ui -> ../qt-bbb/projects/test1/mainwindow.ui
DEBUG 2: EscapeFilePath: ui_mainwindow.h -> ui_mainwindow.h
DEBUG 2: EscapeFilePath: ../qt-bbb/projects/test1/mainwindow.ui -> ../qt-bbb/projects/test1/mainwindow.ui
sh: 1: /opt/qt-arm/bin/uic: Permission denied
DEBUG 2: EscapeFilePath: ../qt-bbb/projects/test1/mainwindow.ui -> ../qt-bbb/projects/test1/mainwindow.ui
DEBUG 2: EscapeFilePath: ui_mainwindow.h -> ui_mainwindow.h
DEBUG 2: EscapeFilePath: ui_mainwindow.h -> ui_mainwindow.h
DEBUG 2: EscapeFilePath: ui_mainwindow.h -> ui_mainwindow.h
DEBUG 2: EscapeFilePath: ui_mainwindow.h -> ui_mainwindow.h
DEBUG 2: EscapeFilePath: yacc -> yacc
DEBUG 2: EscapeFilePath:
->@
-
I don't see any error particular error here