Results 1 to 2 of 2

Thread: pts/tscp hang fix

  1. #1
    Join Date
    Jan 2014
    Location
    Austin, TX
    Posts
    4

    Default pts/tscp hang fix

    pts/tscp hangs on Linux systems because the patch to have program exit does not apply due to the ^M line endings in main.c:

    inflating: tscp181/tscp181.exe
    patching file main.c
    Hunk #1 FAILED at 70 (different line endings).
    1 out of 1 hunk FAILED -- saving rejects to file main.c.rej

    Here is a version of tscp/install.sh which uses base64 to preserver the ^M's in the patch:

    --- install.sh ---
    #!/bin/sh

    unzip -o tscp181.zip
    cd tscp181/

    #Insert into main:
    #+ // Hack, Just bench at start-up and quit
    #+ computer_side = EMPTY;
    #+ bench();
    #+ break;
    (base64 -d | patch -p0 ) <<'EOT'
    LS0tIG1haW4uYy5vcmlnCTIwMTQtMDEtMTUgMTc6MDY6MDguND A1OTI1Nzc0IC0wNjAwCisrKyBt
    YWluLmMJMjAxNC0wMS0xNSAxNzoyMTo1MS4zMjE5MzU4NTEgLT A2MDAKQEAgLTcyLDYgKzcyLDEx
    IEBACiAJCQljb250aW51ZTsNCiAJCX0NCiANCisJCS8vIEhhY2 ssIEp1c3QgYmVuY2ggYXQgc3Rh
    cnQtdXAgYW5kIHF1aXQNCisJCWNvbXB1dGVyX3NpZGUgPSBFTV BUWTsNCisJCWJlbmNoKCk7DQor
    CQlicmVhazsNCisNCiAJCS8qIGdldCB1c2VyIGlucHV0ICovDQ ogCQlwcmludGYoInRzY3A+ICIp
    Ow0KIAkJaWYgKHNjYW5mKCIlcyIsIHMpID09IEVPRikNCg==
    EOT

    cc $CFLAGS *.c -o tscp

    cd ~

    echo "#!/bin/sh
    cd tscp181/
    ./tscp \$@ > \$LOG_FILE 2>&1
    echo \$? > ~/test-exit-status" > tscp
    chmod +x tscp

  2. #2

    Default

    Quote Originally Posted by else58 View Post
    pts/tscp hangs on Linux systems because the patch to have program exit does not apply due to the ^M line endings in main.c:

    inflating: tscp181/tscp181.exe
    patching file main.c
    Hunk #1 FAILED at 70 (different line endings).
    1 out of 1 hunk FAILED -- saving rejects to file main.c.rej

    Here is a version of tscp/install.sh which uses base64 to preserver the ^M's in the patch:

    --- install.sh ---
    #!/bin/sh

    unzip -o tscp181.zip
    cd tscp181/

    #Insert into main:
    #+ // Hack, Just bench at start-up and quit
    #+ computer_side = EMPTY;
    #+ bench();
    #+ break;
    (base64 -d | patch -p0 ) <<'EOT'
    LS0tIG1haW4uYy5vcmlnCTIwMTQtMDEtMTUgMTc6MDY6MDguND A1OTI1Nzc0IC0wNjAwCisrKyBt
    YWluLmMJMjAxNC0wMS0xNSAxNzoyMTo1MS4zMjE5MzU4NTEgLT A2MDAKQEAgLTcyLDYgKzcyLDEx
    IEBACiAJCQljb250aW51ZTsNCiAJCX0NCiANCisJCS8vIEhhY2 ssIEp1c3QgYmVuY2ggYXQgc3Rh
    cnQtdXAgYW5kIHF1aXQNCisJCWNvbXB1dGVyX3NpZGUgPSBFTV BUWTsNCisJCWJlbmNoKCk7DQor
    CQlicmVhazsNCisNCiAJCS8qIGdldCB1c2VyIGlucHV0ICovDQ ogCQlwcmludGYoInRzY3A+ICIp
    Ow0KIAkJaWYgKHNjYW5mKCIlcyIsIHMpID09IEVPRikNCg==
    EOT

    cc $CFLAGS *.c -o tscp

    cd ~

    echo "#!/bin/sh
    cd tscp181/
    ./tscp \$@ > \$LOG_FILE 2>&1
    echo \$? > ~/test-exit-status" > tscp
    chmod +x tscp
    Thanks for looking into this issue. I ended up just carrying the patch inside a custom re-package of TSCP then. The new version is now pushed to OpenBenchmarking.org.

    Thanks again.

    Michael

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •