Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
21 years ago

gtf-launch error while building library

I'm getting an error using Build->Library that indicates gtf-lauch is not found which results in an Error 127 while trying to later open the output file. I've verified that gtf-lauch exists and interestingly enough if I run the exact same makefile command from the NIOSII SDK shell it WORKS fine.

It's not clear to me why gtf-launch would not be detected from the Makefile but will work in the same shell that make was executed in?

Here's the full details:

Quartus Web Editiion 4.2SP1

NIOSII Version 1.1

ecos for NIOSII 1.1

Using NIOSII Development Kit Cyclone 1c20 "standard" FPGA image

Selected Template: NIOSII Development Board and "default" packages.

Then select Build->Library and I get the following output. As you can see gtf-launch was not found.

[Initial output cut]

...

make[1]: Entering directory `/cygdrive/c/altera/project/cyclone_1c20/sgltest_build/error/current'

make[1]: Nothing to be done for `headers'.

make[1]: Leaving directory `/cygdrive/c/altera/project/cyclone_1c20/sgltest_build/error/current'

headers finished

make -r -C hal/nios2/arch/current /cygdrive/c/altera/project/cyclone_1c20/sgltest_install/gtf-launch

make[1]: Entering directory `/cygdrive/c/altera/project/cyclone_1c20/sgltest_build/hal/nios2/arch/current'

make[1]: `/cygdrive/c/altera/project/cyclone_1c20/sgltest_install/gtf-launch' is up to date.

make[1]: Leaving directory `/cygdrive/c/altera/project/cyclone_1c20/sgltest_build/hal/nios2/arch/current'

make -r -C hal/nios2/arch/current /cygdrive/c/altera/project/cyclone_1c20/sgltest_install/include/cyg/hal/system.h

make[1]: Entering directory `/cygdrive/c/altera/project/cyclone_1c20/sgltest_build/hal/nios2/arch/current'

/cygdrive/c/altera/project/cyclone_1c20/sgltest_install/gtf-launch: not found

/cygdrive/c/altera/project/cyclone_1c20/sgltest_install/gtf-launch --gtf=`cygpath -m /cygdrive/c/altera/kits/nios2/components/ecos/ecos-current/packages/hal/nios2/arch/current/gtf/system.h.gtf` --output-directory=`cygpath -m /cygdrive/c/altera/project/cyclone_1c20/sgltest_install/include/cyg/hal/`

make[1]: *** [/cygdrive/c/altera/project/cyclone_1c20/sgltest_install/include/cyg/hal/system.h] Error 127

make[1]: Leaving directory `/cygdrive/c/altera/project/cyclone_1c20/sgltest_build/hal/nios2/arch/current'

make: *** [build] Error 2

make: Leaving directory `/cygdrive/c/altera/project/cyclone_1c20/sgltest_build'

As this point I verified that gtf-lauch was in the expected location:

[SOPC Builder]$ ls -l

total 3

-rw-r--r-- 1 Administ mkpasswd 387 Mar 21 11:13 gtf-launch

drwxr-xr-x 6 Administ mkpasswd 0 Mar 21 11:13 include/

drwxr-xr-x 2 Administ mkpasswd 0 Mar 21 11:13 lib/

-rwxr-xr-x 1 Administ mkpasswd 1425 Mar 21 13:48 program_flash*

/cygdrive/c/altera/project/cyclone_1c20/sgltest_install

I then copied the command that had failed during the Make into the NIOSII SDK Shell and ran it. This command successfully ran and built the system.h file.

I then changed directory to the .../sgltest_build directory and did a "make". It failed to run gtf-launch four more times on 4 different directories/outputs. If I ran the command that failed manually at the shell prompt, all of the associated files were built and then the makefile continued on after re-running. Using this method I was able to build the library. Tedious, but at least it works.

At this point I was able to build, download, and test the example applications and they seem to work.

Any thoughts as to why this will run in the shell but not the Makefile?

Thanks for all your help.

Stefan

20 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Quartus 5 Nios II 5

    Windows XP Pro SP2

    Mapped local Directory as Drive T: eg: C:/Project/test

    when I build eCos on a mapped drive (t:) I always get

    make[1]: Leaving directory `/cygdrive/t/Software/eCos/examples/example_build/hal/nios2/arch/current'

    /cygdrive/t/Software/eCos/examples/example_install/gtf-launch: not found

    make[1]: *** [/cygdrive/t/Software/eCos/examples/example_install/include/cyg/hal/system.h-t] Error 127

    make: *** [build] Error 2

    make: Leaving directory `/cygdrive/t/Software/eCos/examples/example_build'

    when I build it from C:/Project/test It works:-

    Why ?

    I have tryed changing permissions on the mapped drive, didn't help
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I ran into same problem,While i tried to build ecos2.0 with QuartusII 4.2 and NIOSII IDE 1.1 and also with QuatrusII 5.0 and NIOSII IDE 5.0.

    Errors were like

    make[1]: Nothing to be done for `headers'.

    make[1]: Leaving directory `/cygdrive/d/Test_Ecos/ecos_build/error/v2_0'

    headers finished

    make -r -C hal/nios2/arch/v2_0

    /cygdrive/d/Test_Ecos/ecos_install/gtf-launch

    make[1]: Entering directory

    `/cygdrive/d/Test_Ecos/ecos_build/hal/nios2/arch/v2_0'

    /cygdrive/d/Test_Ecos/ecos_install/gtf-launch: not found

    make[1]: `/cygdrive/d/Test_Ecos/ecos_install/gtf-launch' is up to date.

    make[1]: ***

    [/cygdrive/d/Test_Ecos/ecos_install/include/cyg/hal/system.h]

    Error 127

    make[1]: Leaving directory

    `/cygdrive/d/Test_Ecos/ecos_build/hal/nios2/arch/v2_0'

    make: *** [build] Error 2

    Eventually i found the reason for eCos build tools behaving strange and solution for the same. Below is the way i solved my problem

    The above errors are showing up only when I try to built eCos on the Hard Drive having FAT32 Partion. This time around I have converted my Hard Drive's Partion from FAT32 to NTFS. And eCos Tree build was successful.

    This means if anyone tries to build eCos on a Hard Drive having FAT32 File System, faces the problem.

    Conclusion:

    eCos Installation package provided by altera, is not able to build eCos Tree on Hard Drives which are having FAT32 Partions. The suggestion is if someone can modify eCos package such that eCos tools works on the Hard Drives having FAT32 partion than it will be good.

    I hope this helps!!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hmmmm, I can say that my working system is NTFS (WinXP) and non working system is FAT32 (Win2000). It seems odd that more people wouldn't have this problem if all FAT32 doesn't work.

    Does anybody have this problem with a NTFS drive?

    Previous anecdotal evidence implies OS upgrades, etc. have solved the problem although NTFS information is not available. Depending on sls's exact steps, it's not clear to me whether the act of reloading everything from scratch or switching to NTFS solved the problem, but either way it solved the problem.

    sls - Did you use a FAT32 to NTFS conversion program or reload from scratch on NTFS system?

    Monkeyboy - Any thoughts? Can you say for sure whether you tested FAT32 in your setups?

    Certainly converting to NTFS or using NTFS if you are reloading everything from scratch seems like a recomended step to try at this time. Remember to backup critical files before you convert and other standard disclaimer stuff.

    I'll try converting my FAT32 system to NTFS and report back, although it might be a while.

    Stefan
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I had the same problem using NIOS 5.0 on a FAT32 volume on WinXP Prof.

    After changing the "hal_nios2.cdl" I got another compiling problem:

    nios2-elf-gcc -Wa,-gdwarf2 -Wp,-MD,vectors.tmp -I/cygdrive/f/alt_projects/nios_swe/ecos_install/include -I/cygdrive/f/altera/kits/nios2/components/ecos/ecos-current/packages/hal/nios2/arch/current -I/cygdrive/f/altera/kits/nios2/components/ecos/ecos-current/packages/hal/nios2/arch/current/src -I/cygdrive/f/altera/kits/nios2/components/ecos/ecos-current/packages/hal/nios2/arch/current/tests -I. -finline-limit=7000 -g -O3 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -DSYSTEM_BUS_WIDTH=32 -mno-hw-mul -mno-hw-div -c -o /cygdrive/f/alt_projects/nios_swe/ecos_install/lib/vectors.o /cygdrive/f/altera/kits/nios2/components/ecos/ecos-current/packages/hal/nios2/arch/current/src/vectors.S

    cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C

    make[1]: Leaving directory `/cygdrive/f/alt_projects/nios_swe/ecos_build/hal/nios2/arch/current'

    Syntax error: Unterminated quoted string

    make: Leaving directory `/cygdrive/f/alt_projects/nios_swe/ecos_build'

    make[1]: *** [/cygdrive/f/alt_projects/nios_swe/ecos_install/lib/vectors.o] Error 2

    make: *** [build] Error 2

    I have reformatted my volume to NTFS and it works fine now!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I upgraded to Quartus 5.0 (and NIOS, ecos) AND converted my FAT32 drive to NTFS and can report success. No build issues like I was having previously.

    Unfortunately, I forgot to test building after installing 5.0 and before converting to NTFS.

    In any event, I'm NTFS now and running fine.

    Stefan
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I meet this probelem too , and my solution is :

    open the gtf-launch file ,then delete the first blank character of the first line , then save the file;

    I don't know why? ,maybe somebody can explain it.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by jim_xie@Oct 27 2005, 01:44 AM

    i meet this probelem too , and my solution is :

    open the gtf-launch file ,then delete the first blank character of the first line , then save the file;

    i don't know why? ,maybe somebody can explain it.

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=10618)

    --- quote end ---

    --- Quote End ---

    -Previously installed uClinux

    -Have FAT32 Win2k

    -Quartus 5.0

    It did it ,.!

    Thanks

    http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif

    Joel
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I also had the same Issue, And I did the same thing as mentioned below from jim_xie. That worked.. Thanx man!!

    --- Quote Start ---

    originally posted by jim_xie@Oct 27 2005, 02:44 PM

    i meet this probelem too , and my solution is :

    open the gtf-launch file ,then delete the first blank character of the first line , then save the file;

    i don&#39;t know why? ,maybe somebody can explain it.

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=10618)

    --- quote end ---

    --- Quote End ---

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    After that I tried generating the libs again after formatting one of my harddisk drives to NTFS, its working correctly. No problems related to gtf_launch

    akhchand