./project line 1 : Syntax error : unexpected word (expecting ")")...
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
computer-cs-2@computer-cs-2-desktop:~$ su
Password:
root@computer-cs-2-desktop:/home/computer-cs-2# cp -R /home/computer-cs-2/QtSDK/project/ /home/farm
root@computer-cs-2-desktop:/home/computer-cs-2# cd /home/farm
root@computer-cs-2-desktop:/home/farm# ls
buttons computer-cs-2 examples.desktop Genx1 project QtSDK timer
root@computer-cs-2-desktop:/home/farm# cat .bashrc
export PATH=$PATH:/usr/local/arm/4.3.2/bin
export PATH=$PATH:/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/bin
qmake="/usr/local/arm/4.3.2/bin/qmake"
root@computer-cs-2-desktop:/home/farm# cd project\
>
root@computer-cs-2-desktop:/home/farm/project# ls
a1.png form2.h form3.ui main.cpp mainwindow.h moc_mainwindow.cpp project.pro qrc_resource.o serial.h ui_form2.h
form1.h form2.ui form4.h main.o mainwindow.o moc_mainwindow.o project.pro.user resource.qrc serial.o ui_form3.h
form1.ui form3.h form4.ui mainwindow.cpp Makefile project qrc_resource.cpp serial.cpp ui_form1.h ui_form4.h
root@computer-cs-2-desktop:/home/farm/project# rm -r project
root@computer-cs-2-desktop:/home/farm/project# rm -r project.pro
root@computer-cs-2-desktop:/home/farm/project# rm -r project.pro.user
root@computer-cs-2-desktop:/home/farm/project# rm Makefile
root@computer-cs-2-desktop:/home/farm/project# rm moc_mainwindow.o
root@computer-cs-2-desktop:/home/farm/project# rm moc_mainwindow.cpp
root@computer-cs-2-desktop:/home/farm/project# ls
a1.png form1.ui form2.ui form3.ui form4.ui main.o mainwindow.h qrc_resource.cpp resource.qrc serial.h ui_form1.h ui_form3.h
form1.h form2.h form3.h form4.h main.cpp mainwindow.cpp mainwindow.o qrc_resource.o serial.cpp serial.o ui_form2.h ui_form4.h
root@computer-cs-2-desktop:/home/farm/project# rm main.o
root@computer-cs-2-desktop:/home/farm/project# rm qrc_resource.o
root@computer-cs-2-desktop:/home/farm/project# rm qrc_resource.cpp
root@computer-cs-2-desktop:/home/farm/project# ls
a1.png form1.ui form2.ui form3.ui form4.ui mainwindow.cpp mainwindow.o serial.cpp serial.o ui_form2.h ui_form4.h
form1.h form2.h form3.h form4.h main.cpp mainwindow.h resource.qrc serial.h ui_form1.h ui_form3.h
root@computer-cs-2-desktop:/home/farm/project# rm serial.o
root@computer-cs-2-desktop:/home/farm/project# rm mainwindow.o
root@computer-cs-2-desktop:/home/farm/project# ls
a1.png form1.ui form2.ui form3.ui form4.ui mainwindow.cpp resource.qrc serial.h ui_form2.h ui_form4.h
form1.h form2.h form3.h form4.h main.cpp mainwindow.h serial.cpp ui_form1.h ui_form3.h
root@computer-cs-2-desktop:/home/farm/project# qmake -project
root@computer-cs-2-desktop:/home/farm/project# qmake project.pro
root@computer-cs-2-desktop:/home/farm/project# make
/usr/bin/uic-qt4 form2.ui -o ui_form2.h
/usr/bin/uic-qt4 form4.ui -o ui_form4.h
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I. -o main.o main.cpp
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I. -o mainwindow.o mainwindow.cpp
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I. -o serial.o serial.cpp
serial.cpp:33: warning: unused parameter ‘length’
serial.cpp:38: warning: unused parameter ‘length’
serial.cpp: In member function ‘void SerialPort::clearPort()’:
serial.cpp:71: warning: ‘fd’ is used uninitialized in this function
serial.cpp: In member function ‘void SerialPort::writePort(char*, int)’:
serial.cpp:41: warning: ‘fd’ is used uninitialized in this function
serial.cpp: In member function ‘void SerialPort::readPort(char*, int)’:
serial.cpp:36: warning: ‘fd’ is used uninitialized in this function
/usr/bin/moc-qt4 -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I. mainwindow.h -o moc_mainwindow.cpp
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I. -o moc_mainwindow.o moc_mainwindow.cpp
/usr/bin/rcc -name resource resource.qrc -o qrc_resource.cpp
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I. -o qrc_resource.o qrc_resource.cpp
g++ -Wl,-O1 -o project main.o mainwindow.o serial.o moc_mainwindow.o qrc_resource.o -L/usr/lib -lQtGui -lQtCore -lpthread
root@computer-cs-2-desktop:/home/farm/project# ping 192.168.1.230
PING 192.168.1.230 (192.168.1.230) 56(84) bytes of data.
64 bytes from 192.168.1.230: icmp_seq=1 ttl=241 time=66.1 ms
64 bytes from 192.168.1.230: icmp_seq=2 ttl=241 time=76.2 ms
64 bytes from 192.168.1.230: icmp_seq=3 ttl=241 time=72.7 ms
^C
--- 192.168.1.230 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 66.160/71.702/76.208/4.178 ms
root@computer-cs-2-desktop:/home/farm/project# ftp 192.168.1.230
^Croot@computer-cs-2-desktop:/home/farm/project# ifconfig eth0 192.168.1.1 netmask 255.255.255.0
root@computer-cs-2-desktop:/home/farm/project# ftp 192.168.1.230
Connected to 192.168.1.230.
220 FriendlyARM FTP server (Version 6.4/OpenBSD/Linux-ftpd-0.17) ready.
Name (192.168.1.230:computer-cs-2): root
331 Password required for root.
Password:
230 User root logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for '/bin/ls'.
-rw-r--r-- 1 root root 436 Jan 1 1970 .ash_history
-rw-r--r-- 1 root root 0 Jan 1 08:00 1?[=1?[
-rw-r--r-- 1 root root 0 Jan 1 08:00 4[4
drwxr-xr-x 1 root root 2048 Mar 4 2011 bin
drwxr-xr-x 7 root root 0 Jan 1 08:00 dev
drwxr-xr-x 1 root root 2048 Jan 1 08:14 etc
drwxr-xr-x 1 root root 2048 Jul 5 2007 home
drwxr-xr-x 1 root root 2048 Mar 4 2011 lib
lrwxrwxrwx 1 root root 11 Mar 4 2011 linuxrc -> bin/busybox
drwx------ 1 root root 2048 Jan 1 08:00 lost+found
drwxr-xr-x 1 root root 2048 Jan 5 2010 mnt
drwxr-xr-x 1 root root 2048 Mar 4 2011 opt
dr-xr-xr-x 39 root root 0 Jan 1 08:00 proc
-rw-r----- 1 root root 105243 Jan 1 08:11 project
drwxr-xr-x 1 root root 2048 Jan 1 08:28 root
drwxr-xr-x 1 root root 2048 Mar 4 2011 sbin
drwxr-xr-x 11 root root 0 Jan 1 08:00 sys
drwxr-xr-x 2 root root 0 Jan 1 08:00 tmp
drwxr-xr-x 1 root root 2048 Mar 4 2011 usr
drwxr-xr-x 7 root root 0 Jan 1 08:00 var
drwx------ 1 root root 2048 Apr 1 2009 www
226 Transfer complete.
ftp> cd /root
250 CWD command successful.
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for '/bin/ls'.
drwx------ 1 root root 2048 Mar 26 2009 .kde
drwxr-xr-x 1 root root 2048 Feb 11 2024 Applications
drwxr-x--- 1 root root 2048 Jan 1 08:28 CEPLapps
drwxr-xr-x 1 root root 2048 Jan 6 2010 Documents
-rwxr-x--x 1 root root 546567 Jan 1 1970 Genx1
drwxr-xr-x 1 root root 2048 Jan 1 08:00 Settings
-rw-r--r-- 1 root root 1 Jan 1 08:28 etc
-rwxr-x--x 1 root root 105243 Jan 1 1970 project
drwxr-xr-x 1 root root 2048 Jan 1 08:00 tmp
226 Transfer complete.
ftp> send project
local: project remote: project
200 PORT command successful.
150 Opening BINARY mode data connection for 'project'.
226 Transfer complete.
105243 bytes sent in 0.02 secs (4202.7 kB/s)
ftp> bye
221 Goodbye.
root@computer-cs-2-desktop:/home/farm/project# telnet 192.168.1.230
Trying 192.168.1.230...
Connected to 192.168.1.230.
Escape character is '^]'.
Kernel 2.6.32.2-FriendlyARM on (/dev/pts/0)
FriendlyARM login: root
Password:
[root@FriendlyARM /]# ls
1?[=1?[ bin etc lib lost+found opt project sbin tmp var
4[4 dev home linuxrc mnt proc root sys usr www
[root@FriendlyARM /]# cd /root
[root@FriendlyARM /root]# ls
Applications CEPLapps Documents Genx1 Settings etc project tmp
[root@FriendlyARM /root]# chmod +x project
[root@FriendlyARM /root]# ls
Applications CEPLapps Documents Genx1 Settings etc project tmp
[root@FriendlyARM /root]# export TSLIB_TSEVENTTYPE=INPUT
[root@FriendlyARM /root]#
[root@FriendlyARM /root]# export TSLIB_CONSOLEDEVICE=none
[root@FriendlyARM /root]#
[root@FriendlyARM /root]# export TSLIB_FBDEVICE=/dev/fb0
[root@FriendlyARM /root]#
[root@FriendlyARM /root]# export TSLIB_TSDEVICE=/dev/touchscreen-1wire
[root@FriendlyARM /root]#
[root@FriendlyARM /root]# export TSLIB_CALIBFILE=/etc/pointercal
[root@FriendlyARM /root]#
[root@FriendlyARM /root]# export TSLIB_CONFFILE=/etc/ts.conf
[root@FriendlyARM /root]#
[root@FriendlyARM /root]# export TSLIB_PLUGINDIR=/usr/lib/ts
[root@FriendlyARM /root]#
[root@FriendlyARM /root]# export LD_LIBRARY_PATH=/usr/local/Trolltech/QtEmbedded-4.7.0-arm/lib
[root@FriendlyARM /root]#
[root@FriendlyARM /root]# export QTDIR=/usr/local/Trolltech/QtEmbedded-4.7.0-arm
[root@FriendlyARM /root]#
[root@FriendlyARM /root]# export QWS_MOUSE_PROTO=tslib:/dev/touchscreen-1wire
[root@FriendlyARM /root]#
[root@FriendlyARM /root]# export QWS_SIZE='480x272'
[root@FriendlyARM /root]# cd
[root@FriendlyARM /]# ls
1?[=1?[ bin etc lib lost+found opt project sbin tmp var
4[4 dev home linuxrc mnt proc root sys usr www
[root@FriendlyARM /]# cd /root
[root@FriendlyARM /root]# ls
Applications CEPLapps Documents Genx1 Settings etc project tmp
[root@FriendlyARM /root]# ./project -qws
./project: line 1: syntax error: "(" unexpected
[root@FriendlyARM /root]# ls
Applications CEPLapps Documents Genx1 Settings etc project tmp
[root@FriendlyARM /root]# exit
Connection closed by foreign host.
root@computer-cs-2-desktop:/home/farm/project# telnet 192.168.1.230
Trying 192.168.1.230...
Connected to 192.168.1.230.
Escape character is '^]'.
Kernel 2.6.32.2-FriendlyARM on (/dev/pts/0)
FriendlyARM login: root
Password:
[root@FriendlyARM /]# ls
1?[=1?[ bin etc lib lost+found opt project sbin tmp var
4[4 dev home linuxrc mnt proc root sys usr www
[root@FriendlyARM /]# cd /root
[root@FriendlyARM /root]# ls
Applications CEPLapps Documents Genx1 Settings etc project tmp
[root@FriendlyARM /root]# cd CEPLapps
[root@FriendlyARM CEPLapps]# ls
project
[root@FriendlyARM CEPLapps]# export TSLIB_TSEVENTTYPE=INPUT
[root@FriendlyARM CEPLapps]#
[root@FriendlyARM CEPLapps]# export TSLIB_CONSOLEDEVICE=none
[root@FriendlyARM CEPLapps]#
[root@FriendlyARM CEPLapps]# export TSLIB_FBDEVICE=/dev/fb0
[root@FriendlyARM CEPLapps]#
[root@FriendlyARM CEPLapps]# export TSLIB_TSDEVICE=/dev/touchscreen-1wire
[root@FriendlyARM CEPLapps]#
[root@FriendlyARM CEPLapps]# export TSLIB_CALIBFILE=/etc/pointercal
[root@FriendlyARM CEPLapps]#
[root@FriendlyARM CEPLapps]# export TSLIB_CONFFILE=/etc/ts.conf
[root@FriendlyARM CEPLapps]#
[root@FriendlyARM CEPLapps]# export TSLIB_PLUGINDIR=/usr/lib/ts
[root@FriendlyARM CEPLapps]#
[root@FriendlyARM CEPLapps]# export LD_LIBRARY_PATH=/usr/local/Trolltech/QtEmbedded-4.7.0-arm/lib
[root@FriendlyARM CEPLapps]#
[root@FriendlyARM CEPLapps]# export QTDIR=/usr/local/Trolltech/QtEmbedded-4.7.0-arm
[root@FriendlyARM CEPLapps]#
[root@FriendlyARM CEPLapps]# export QWS_MOUSE_PROTO=tslib:/dev/touchscreen-1wire
[root@FriendlyARM CEPLapps]#
[root@FriendlyARM CEPLapps]# export QWS_SIZE='480x272'
[root@FriendlyARM CEPLapps]# ls
project
[root@FriendlyARM CEPLapps]# rm project
[root@FriendlyARM CEPLapps]# ls
[root@FriendlyARM CEPLapps]# cd .root
-sh: cd: can't cd to .root
[root@FriendlyARM CEPLapps]# cd /root
[root@FriendlyARM /root]# ls
Applications CEPLapps Documents Genx1 Settings etc project tmp
[root@FriendlyARM /root]# cd CEPLapps
[root@FriendlyARM CEPLapps]# export TSLIB_TSEVENTTYPE=INPUT
[root@FriendlyARM CEPLapps]#
[root@FriendlyARM CEPLapps]# export TSLIB_CONSOLEDEVICE=none
[root@FriendlyARM CEPLapps]#
[root@FriendlyARM CEPLapps]# export TSLIB_FBDEVICE=/dev/fb0
[root@FriendlyARM CEPLapps]#
[root@FriendlyARM CEPLapps]# export TSLIB_TSDEVICE=/dev/touchscreen-1wire
[root@FriendlyARM CEPLapps]#
[root@FriendlyARM CEPLapps]# export TSLIB_CALIBFILE=/etc/pointercal
[root@FriendlyARM CEPLapps]#
[root@FriendlyARM CEPLapps]# export TSLIB_CONFFILE=/etc/ts.conf
[root@FriendlyARM CEPLapps]#
[root@FriendlyARM CEPLapps]# export TSLIB_PLUGINDIR=/usr/lib/ts
[root@FriendlyARM CEPLapps]#
[root@FriendlyARM CEPLapps]# export LD_LIBRARY_PATH=/usr/local/Trolltech/QtEmbedded-4.7.0-arm/lib
[root@FriendlyARM CEPLapps]#
[root@FriendlyARM CEPLapps]# export QTDIR=/usr/local/Trolltech/QtEmbedded-4.7.0-arm
[root@FriendlyARM CEPLapps]#
[root@FriendlyARM CEPLapps]# export QWS_MOUSE_PROTO=tslib:/dev/touchscreen-1wire
[root@FriendlyARM CEPLapps]#
[root@FriendlyARM CEPLapps]# export QWS_SIZE='480x272'
[root@FriendlyARM CEPLapps]# cd
[root@FriendlyARM /]# cd /root
[root@FriendlyARM /root]# ls
Applications CEPLapps Documents Genx1 Settings etc project tmp
[root@FriendlyARM /root]# chmod +x project
[root@FriendlyARM /root]# ./project -qws
./project: line 1: syntax error: "(" unexpected
[root@FriendlyARM /root]# exit
Connection closed by foreign host.
root@computer-cs-2-desktop:/home/farm/project# ./project
QGtkStyle was unable to detect the current GTK+ theme.
Qt: Session management error: None of the authentication protocols specified are supported
root@computer-cs-2-desktop:/home/farm/project# telnet 192.168.1.230
Trying 192.168.1.230...
Connected to 192.168.1.230.
Escape character is '^]'.
Kernel 2.6.32.2-FriendlyARM on (/dev/pts/0)
FriendlyARM login: root
Password:
[root@FriendlyARM /]# ls
1?[=1?[ bin etc lib lost+found opt project sbin tmp var
4[4 dev home linuxrc mnt proc root sys usr www
[root@FriendlyARM /]# cd /root
[root@FriendlyARM /root]# ls
Applications CEPLapps Documents Genx1 Settings etc project tmp
[root@FriendlyARM /root]# chmod +x project
[root@FriendlyARM /root]# ls
Applications CEPLapps Documents Genx1 Settings etc project tmp
[root@FriendlyARM /root]# cd CEPLapps
[root@FriendlyARM CEPLapps]# export TSLIB_TSEVENTTYPE=INPUT
[root@FriendlyARM CEPLapps]#
[root@FriendlyARM CEPLapps]# export TSLIB_CONSOLEDEVICE=none
[root@FriendlyARM CEPLapps]#
[root@FriendlyARM CEPLapps]# export TSLIB_FBDEVICE=/dev/fb0
[root@FriendlyARM CEPLapps]#
[root@FriendlyARM CEPLapps]# export TSLIB_TSDEVICE=/dev/touchscreen-1wire
[root@FriendlyARM CEPLapps]#
[root@FriendlyARM CEPLapps]# export TSLIB_CALIBFILE=/etc/pointercal
[root@FriendlyARM CEPLapps]#
[root@FriendlyARM CEPLapps]# export TSLIB_CONFFILE=/etc/ts.conf
[root@FriendlyARM CEPLapps]#
[root@FriendlyARM CEPLapps]# export TSLIB_PLUGINDIR=/usr/lib/ts
[root@FriendlyARM CEPLapps]#
[root@FriendlyARM CEPLapps]# export LD_LIBRARY_PATH=/usr/local/Trolltech/QtEmbedded-4.7.0-arm/lib
[root@FriendlyARM CEPLapps]#
[root@FriendlyARM CEPLapps]# export QTDIR=/usr/local/Trolltech/QtEmbedded-4.7.0-arm
[root@FriendlyARM CEPLapps]#
[root@FriendlyARM CEPLapps]# export QWS_MOUSE_PROTO=tslib:/dev/touchscreen-1wire
[root@FriendlyARM CEPLapps]#
[root@FriendlyARM CEPLapps]# export QWS_SIZE='480x272'
[root@FriendlyARM CEPLapps]# ls
[root@FriendlyARM CEPLapps]# cd
[root@FriendlyARM /]# cd /root
[root@FriendlyARM /root]# ls
Applications CEPLapps Documents Genx1 Settings etc project tmp
[root@FriendlyARM /root]# ./project -qws
./project: line 1: syntax error: "(" unexpected
hello everyone,the above post is my code for deploying applications from pc to mini 2440,,here everything is working fine....but at end in -qws command its showing syntax error...i googled so much from past 10 days..but is it of no use...can anyone help me to come out of this error..thanks in advance
why can't you understand you need to post the file named project. Nothing else. project.pro or any other file will not help.
As I see the file is located in /root, so please show us the file /root/project (without any extension).
so the project file is a binary executable.
ih this case please execute strace -o /tmp/tmpfile ./project -qws
you will get a new file /tmp/tmpfile
you can grep open /tmp/tmpfile for searching files opened by this app. I do not know which one contains ( in the first line.
Last edited by pan64; 04-27-2012 at 02:38 AM.
Reason: highlight command
hello pan64,
thank you so much for replying me....I am installing that strace file....after that i will try to execute that command,,,let me see that file and post you...
Pls u keep in touch...
hello pan64,
i have downloaded and installed the strace in ubuntu...but how to do for mini 2440....without installing strace for mini 2440,i cant run that command in friendly arm ..how to do this
I had the same problem today, but with hello.c example and arm-linux-gnueabi-gcc-4.5.2,
after I install new virtual machine with Debian and I install arm-linux-gcc-4.4.3.tgz (toolchain of mini2440).
I compile with arm-none-linux-gnueabi-gcc and I send the exe by FTP in transfer type : binary.
If I send the file in transfer type : auto I had a Segmentation fault.
maybe the /root/project file is not an executable for arm
can you check file project and file /bin/bash (or some other available executable) on your mini (not PC)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.