Gcc Syntax Error Unexpected
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site syntax error: "(" unexpected bash About Us Learn more about Stack Overflow the company Business Learn more about
Syntax Error At Line 1 (' Unexpected In Shell Script
hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss
Syntax Error ( Unexpected Bash Array
Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up C binary : syntax
Syntax Error ( Unexpected Ubuntu
error: `(' unexpected up vote -2 down vote favorite I am having a weird error. Before I begin, my question is not a copy of Syntax error unexpected. I have a C file. If I do gcc code.c -Wall. It creates a.out. And I am able to run ./a.out. No errors and no warnings. In my case I have to compile this code for another ksh syntax error unexpected compiler (to run on another architecture [powerpc-8540-netbsd-gcc]). In that makefile also I get no error during compilation and linking. But when I run it, I get : ./name_of_exe[1]: syntax error: `(' unexpected name_of_exe is my executable. What could be causing this error? c makefile cross-platform exe share|improve this question edited Feb 6 '15 at 9:45 asked Feb 6 '15 at 9:37 0aslam0 434422 What is the another compiler? What is the exact command issued by make to compile it? What is the code? –rubikonx9 Feb 6 '15 at 9:39 try gcc code.c -Wall. Enable all warnings –Santosh A Feb 6 '15 at 9:42 1 Isn't like syntax error is produced by the compiler and you're saying at runtime? I'm confused. –Sourav Ghosh Feb 6 '15 at 9:43 @SouravGhosh same feeling here –0aslam0 Feb 6 '15 at 9:44 and what is that [1] thing? –Sourav Ghosh Feb 6 '15 at 9:45 | show 4 more comments 1 Answer 1 active oldest votes up vote 0 down vote accepted The error was caused due to error in linking a dynamic library, specifically "libc". The version
17 Likes Received: 0 Hi everyone, I am trying to compile the kernel and am having some problems. This is my line 1 syntax error unexpected word (expecting ) ) first kernel compile so it is very possible that I am missing syntax error word unexpected (expecting ) ) shell script something, although I have followed the instructions exactly. Looking through the UDOO manual (under Downloads > Documentation) I bash function syntax error unexpected execute the below commands: Code: curl http://download.udoo.org/files/crosscompiler/arm-fsl-linux-gnueabi.tar.gz | tar -xzv sudo apt-get install build-essential ncurses-dev uboot-mkimage git git clone http://github.com/UDOOboard/Kernel_Unico kernel cd kernel make ARCH=arm UDOO_defconfig make ARCH=arm menuconfig make http://stackoverflow.com/questions/28362655/c-binary-syntax-error-unexpected -j4 CROSS_COMPILE=../arm-fsl-linux-gnueabi/bin/arm-fsl-linux-gnueabi- ARCH=arm uImage modules Up until the actual compilation (last command) all is well. But when I execute the last command I get these errors. Code: root@udoo:/usr/src/kernel# sudo make -j4 CROSS_COMPILE=../arm-fsl-linux-gnueabi/bin/arm-fsl-linux-gnueabi- ARCH=arm uImage modules ../arm-fsl-linux-gnueabi/bin/arm-fsl-linux-gnueabi-gcc: 1: ../arm-fsl-linux-gnueabi/bin/arm-fsl-linux-gnueabi-gcc: Syntax error: "(" unexpected make: execvp: /usr/src/kernel/scripts/setsecoversion: Permission denied CHK include/linux/version.h CC scripts/mod/empty.o ../arm-fsl-linux-gnueabi/bin/arm-fsl-linux-gnueabi-gcc: 1: ../arm-fsl-linux-gnueabi/bin/arm-fsl-linux-gnueabi-gcc: Syntax error: "(" unexpected make[2]: *** http://www.udoo.org/forum/threads/solved-failed-compile-syntax-error-during-make.798/ [scripts/mod/empty.o] Error 2 make[1]: *** [scripts/mod] Error 2 make: *** [scripts] Error 2 make: *** Waiting for unfinished jobs.... Just to confirm. Up until that error, everything was fine. I downloaded the cross-compiler and did a git clone just fine. No issues there. I even deleted the files (the compiler and the kernel) and did it all again because I thought there may have been a corruption. The point of this exercise is to build the kernel with the TUN driver installed, so I also tried configuring the TUN driver on and then I also tried just compiling it at vanilla defaults. Same issue still. From what I can gather file ../arm-fsl-linux-gnueabi/bin/arm-fsl-linux-gnueabi-gcc is a C++ executable. Which would explain why I can't open it up and see any source code to see where the syntax error is... When I do a 'file' of it I get Code: ../arm-fsl-linux-gnueabi/bin/arm-fsl-linux-gnueabi-gcc: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.0, stripped I am very noob here and probably in over my head.
Get Kubuntu Get Xubuntu Get Lubuntu Get UbuntuStudio Get Mythbuntu Get Edubuntu Get Ubuntu-GNOME Get UbuntuKylin Ubuntu Code of Conduct Ubuntu Wiki Community https://ubuntuforums.org/showthread.php?t=2201197 Wiki Other Support Launchpad Answers Ubuntu IRC Support AskUbuntu Official Documentation User http://www.friendlyarm.net/forum/topic/2002 Documentation Social Media Facebook Twitter Useful Links Distrowatch Bugs: Ubuntu PPAs: Ubuntu Web Upd8: Ubuntu OMG! Ubuntu Ubuntu Insights Planet Ubuntu Activity Page Please read before SSO login Advanced Search Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk [SOLVED] Code:Blocks syntax error Having syntax error an Issue With Posting ? Do you want to help us debug the posting issues ? < is the place to report it, thanks ! Page 1 of 2 12 Last Jump to page: Results 1 to 10 of 13 Thread: Code:Blocks syntax error Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode syntax error unexpected Switch to Threaded Mode January 23rd, 2014 #1 toaster3 View Profile View Forum Posts Private Message First Cup of Ubuntu Join Date Jan 2014 Beans 6 Code:Blocks syntax error I am doing some *very* basic coding in C using code blocks. I kept running into a syntax error, even on something as fundamental as a hello, world: #include
11:37:22 hi all what is problem "./test_capture: line 1: syntax error: "(" unexpected"? [root@FriendlyARM /]# cd sdcard [root@FriendlyARM /sdcard]# ls mjpg-streamer s3c2440camera.ko test_capture [root@FriendlyARM /sdcard]# chmod u+x s3c2440camera.ko [root@FriendlyARM /sdcard]# chmod u+x test_capture [root@FriendlyARM /sdcard]# insmod s3c2440camera.ko [root@FriendlyARM /sdcard]# ./test_capture ./test_capture: line 1: syntax error: "(" unexpected [root@FriendlyARM /sdcard]# regards majid 2010-11-14 11:40:00 s3c2440camera has built with linux-2.6.29 mini2440 Kernel is 2.6.29.4-FriendlyARM on (/dev/pts/0) mohan 2011-10-18 07:06:48 line 1: syntax error: "(" unexpected got same when I run some executable mohan 2011-10-18 07:12:36 cross compile your code arm-linux-gcc. I mean use cross complier mohan 2011-10-18 07:14:09 masjid line 1: syntax error: "(" unexpected is solved just cross compile your code using arm-linux-gcc. I mean use cross complier shaco 2011-10-19 13:15:29 compile your program with: arm-linux-gcc -o target sourcecode marcovaldo 2012-02-17 20:09:07 suppose your crosscompiling or linking didn't work at all. I got exacly the same error message when my lazarus/fpc cross arm compiler was not set up correctly (and produced some kind of error file or wrong type of linker file) This file is what your target tries to execute(or at least display) amol 2012-05-02 16:16:14 how to cross compile the test_capture file by using arm-linux-gcc arun 2013-10-21 17:01:16 Im working with arm DM3730 in that i wrote a shell script for testing gpio by led .... i got the same error /bin/led.sh: line 3: syntax error: "(" unexpected #!/bin/sh GPIO_min=( 70 88 140 116 55 17 12 158 161 ) GPIO_max=( 85 91 143 119 58 20 13 159 162 ) for ((i=0; i < 9; i++)); do for ((j=${GPIO_min[i]}; j < ${GPIO_max[i]}; j++)); do echo $j > /sys/class/gpio/export sleep .5 echo out > /sys/class/gpio/gpio$j/direction sleep .5 echo 1 > /sys/class/gpio/gpio$j/value sleep .5 echo 0 > /sys/class/gpio/gpio$j/value sleep .5 echo 1 > /sys/class/gpio/gpio$j/value sleep .5 done done ~ ~ Reply Name eMail (not visible) Subject (no text only in upper case; no HELP, URGENT...) TextHTML tags are not supported and links are generated automatically if they st