Author Topic: "Luna" is here and converts your .lua files into 3.0.2-compatible .tns files  (Read 58595 times)

0 Members and 1 Guest are viewing this topic.

Offline ExtendeD

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Re: "Luna" is here and converts your .lua files into 3.0.2-compatible .tns files
« Reply #75 on: September 27, 2011, 01:39:51 pm »
@ExtendeD:
Please try if my Makefile also works on Windows, if it does, please use it instead of your Makefile. It's the only thing that needs to be changed to compile Luna on Mac OS X.

It does produce errors on Windows. Could you please try this one on MacOS which should now be cross-platform?

Do you plan to include a Linux and a Mac build the next time (or does this one already feature it)? For people who can't build one themselves, it'd be neat.

No, sorry, and I have neither Linux nor Mac boxes do to this.
Ndless.me with the finest TI-Nspire programs

Offline Cuervo

  • LV2 Member (Next: 40)
  • **
  • Posts: 33
  • Rating: +2/-1
    • View Profile
Re: "Luna" is here and converts your .lua files into 3.0.2-compatible .tns files
« Reply #76 on: September 27, 2011, 01:50:31 pm »
@ExtendeD:

Yes, works almost, I do not have any idea why your's doesn't work.

This is yours:
Code: [Select]
OS ?= `uname -s`
ifeq ($(OS),Windows_NT)
EXEEXT = .exe
else
CFLAGS=$(CFLAGS) -Dfopen64=fopen -Dfseeko64=fseeko -Dftello64=ftello
LDFLAGS=$(LDFLAGS) -lcrypto
endif

This works:
Code: [Select]
OS ?= `uname -s`
ifeq ($(OS),Windows_NT)
EXEEXT = .exe
else
CFLAGS = -W -Wall -m32 -Dfopen64=fopen -Dfseeko64=fseeko -Dftello64=ftello
LDFLAGS = -lssl -lz -m32 -lcrypto
endif


Yours gives me something like this:

Code: [Select]
Mac:src username$ make dist
rm -rf *.o luna dist
Makefile:10: *** Recursive variable `CFLAGS' references itself (eventually).  Stop.
Don't know why..   ???

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: "Luna" is here and converts your .lua files into 3.0.2-compatible .tns files
« Reply #77 on: September 27, 2011, 01:56:04 pm »
Maybe
Code: [Select]
CFLAGS += -Dfopen64=fopen -Dfseeko64=fseeko -Dftello64=ftello
LDFLAGS += -lcrypto
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline Cuervo

  • LV2 Member (Next: 40)
  • **
  • Posts: 33
  • Rating: +2/-1
    • View Profile
Re: "Luna" is here and converts your .lua files into 3.0.2-compatible .tns files
« Reply #78 on: September 27, 2011, 02:00:33 pm »
Ok, that works^^

Thanks

Code: [Select]
OS ?= `uname -s`
ifeq ($(OS),Windows_NT)
EXEEXT = .exe
else
CFLAGS += -Dfopen64=fopen -Dfseeko64=fseeko -Dftello64=ftello
LDFLAGS += -lcrypto
endif

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: "Luna" is here and converts your .lua files into 3.0.2-compatible .tns files
« Reply #79 on: September 27, 2011, 02:02:51 pm »
And what about
Code: [Select]
-D_FILE_OFFSET_BITS=64 -D_LARGEFILEinstead of
Code: [Select]
-Dfopen64=fopen -Dfseeko64=fseeko -Dftello64=ftello?

(works for me under 64-bit Debian Testing, both in native and in 32-bit mode with CFLAGS and LDFLAGS both containing -m32)
« Last Edit: September 27, 2011, 02:06:09 pm by Lionel Debroux »
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline Cuervo

  • LV2 Member (Next: 40)
  • **
  • Posts: 33
  • Rating: +2/-1
    • View Profile
Re: "Luna" is here and converts your .lua files into 3.0.2-compatible .tns files
« Reply #80 on: September 27, 2011, 02:15:45 pm »
No.

Code: [Select]
rm -rf *.o luna dist
gcc -W -Wall -m32 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE   -c -o luna.o luna.c
gcc -W -Wall -m32 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE   -c -o zip.o minizip-1.1/zip.c
In file included from minizip-1.1/zip.c:196:
minizip-1.1/crypt.h:35: warning: unused parameter ‘pcrc_32_tab’
gcc -W -Wall -m32 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE   -c -o ioapi.o minizip-1.1/ioapi.c
minizip-1.1/ioapi.c:83: warning: unused parameter ‘opaque’
minizip-1.1/ioapi.c: In function ‘fopen64_file_func’:
minizip-1.1/ioapi.c:115: warning: implicit declaration of function ‘fopen64’
minizip-1.1/ioapi.c:115: warning: assignment makes pointer from integer without a cast
minizip-1.1/ioapi.c: At top level:
minizip-1.1/ioapi.c:101: warning: unused parameter ‘opaque’
minizip-1.1/ioapi.c:120: warning: unused parameter ‘opaque’
minizip-1.1/ioapi.c:127: warning: unused parameter ‘opaque’
minizip-1.1/ioapi.c:134: warning: unused parameter ‘opaque’
minizip-1.1/ioapi.c: In function ‘ftell64_file_func’:
minizip-1.1/ioapi.c:145: warning: implicit declaration of function ‘ftello64’
minizip-1.1/ioapi.c: At top level:
minizip-1.1/ioapi.c:142: warning: unused parameter ‘opaque’
minizip-1.1/ioapi.c:149: warning: unused parameter ‘opaque’
minizip-1.1/ioapi.c: In function ‘fseek64_file_func’:
minizip-1.1/ioapi.c:191: warning: implicit declaration of function ‘fseeko64’
minizip-1.1/ioapi.c: At top level:
minizip-1.1/ioapi.c:172: warning: unused parameter ‘opaque’
minizip-1.1/ioapi.c:198: warning: unused parameter ‘opaque’
minizip-1.1/ioapi.c:205: warning: unused parameter ‘opaque’
gcc -o luna luna.o zip.o ioapi.o -lssl -lz -m32 -lcrypto
Undefined symbols:
  "_fopen64", referenced from:
      _fopen64_file_func in ioapi.o
     (maybe you meant: _fill_fopen64_filefunc)
  "_fseeko64", referenced from:
      _fseek64_file_func in ioapi.o
  "_ftello64", referenced from:
      _ftell64_file_func in ioapi.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [luna] Error 1

I think
Code: [Select]
-Dfopen64=fopen -Dfseeko64=fseeko -Dftello64=ftellois necessary.

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: "Luna" is here and converts your .lua files into 3.0.2-compatible .tns files
« Reply #81 on: September 27, 2011, 02:35:29 pm »
OK. Well, that series of defines works, but it's not really correct...

Maybe
Code: [Select]
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64?
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline Cuervo

  • LV2 Member (Next: 40)
  • **
  • Posts: 33
  • Rating: +2/-1
    • View Profile
Re: "Luna" is here and converts your .lua files into 3.0.2-compatible .tns files
« Reply #82 on: September 27, 2011, 02:49:12 pm »
Code: [Select]
gcc -W -Wall -m32 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64   -c -o luna.o luna.c
gcc -W -Wall -m32 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64   -c -o zip.o minizip-1.1/zip.c
In file included from minizip-1.1/zip.c:196:
minizip-1.1/crypt.h:35: warning: unused parameter ‘pcrc_32_tab’
gcc -W -Wall -m32 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64   -c -o ioapi.o minizip-1.1/ioapi.c
minizip-1.1/ioapi.c:83: warning: unused parameter ‘opaque’
minizip-1.1/ioapi.c: In function ‘fopen64_file_func’:
minizip-1.1/ioapi.c:115: warning: implicit declaration of function ‘fopen64’
minizip-1.1/ioapi.c:115: warning: assignment makes pointer from integer without a cast
minizip-1.1/ioapi.c: At top level:
minizip-1.1/ioapi.c:101: warning: unused parameter ‘opaque’
minizip-1.1/ioapi.c:120: warning: unused parameter ‘opaque’
minizip-1.1/ioapi.c:127: warning: unused parameter ‘opaque’
minizip-1.1/ioapi.c:134: warning: unused parameter ‘opaque’
minizip-1.1/ioapi.c: In function ‘ftell64_file_func’:
minizip-1.1/ioapi.c:145: warning: implicit declaration of function ‘ftello64’
minizip-1.1/ioapi.c: At top level:
minizip-1.1/ioapi.c:142: warning: unused parameter ‘opaque’
minizip-1.1/ioapi.c:149: warning: unused parameter ‘opaque’
minizip-1.1/ioapi.c: In function ‘fseek64_file_func’:
minizip-1.1/ioapi.c:191: warning: implicit declaration of function ‘fseeko64’
minizip-1.1/ioapi.c: At top level:
minizip-1.1/ioapi.c:172: warning: unused parameter ‘opaque’
minizip-1.1/ioapi.c:198: warning: unused parameter ‘opaque’
minizip-1.1/ioapi.c:205: warning: unused parameter ‘opaque’
gcc -o luna luna.o zip.o ioapi.o -lssl -lz -m32 -lcrypto
Undefined symbols:
  "_fopen64", referenced from:
      _fopen64_file_func in ioapi.o
     (maybe you meant: _fill_fopen64_filefunc)
  "_fseeko64", referenced from:
      _fseek64_file_func in ioapi.o
  "_ftello64", referenced from:
      _ftell64_file_func in ioapi.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [luna] Error 1


http://hintsforums.macworld.com/archive/index.php/t-60356.html

Quote from: dmacks
Welcome to the world of software porting, where every operating system is different and often in ways that the author of the software you want didn't know were important. There's no fopen64 function on OS X because the standard fopen function includes the added 64-bit functionality that is only present in the *64 symbols on other machines. Try passing -Dfopen64=fopen in CPPFLAGS.

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: "Luna" is here and converts your .lua files into 3.0.2-compatible .tns files
« Reply #83 on: September 27, 2011, 03:02:55 pm »
ACK :)
On pages dealing with MacOS X, I had also seen references to the defines I posted.

I think we should special-case MacOS X in the Makefile, and leave -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 on Linux/glibc or *BSD/libc.
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline Goplat

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 289
  • Rating: +82/-0
    • View Profile
Re: "Luna" is here and converts your .lua files into 3.0.2-compatible .tns files
« Reply #84 on: September 27, 2011, 03:12:29 pm »
Anything larger than 4GB won't fit on the TI-Nspire anyway. I say just stick to the ANSI standard, universally available 32-bit functions on all platforms.
Numquam te deseram; numquam te deficiam; numquam circa curram et te desolabo
Numquam te plorare faciam; numquam valedicam; numquam mendacium dicam et te vulnerabo

Offline sammyMaX

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 204
  • Rating: +9/-0
    • View Profile
Can anyone help me compile luna on Linux? I have OpenSSL and zlib packages installed, but it still gives me
luna.o: In function `doccrypt':
luna.c:(.text+0x6aa): undefined reference to `DES_set_key_checked'
luna.c:(.text+0x6c9): undefined reference to `DES_set_key_checked'
luna.c:(.text+0x6e8): undefined reference to `DES_set_key_checked'
luna.c:(.text+0x795): undefined reference to `DES_ecb3_encrypt'

Any suggestions?

Are you wondering who Sammy is? My avatar is Sammy.
   

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Can you give OS version, and Luna version?
Luna compiles just fine for me, but I don't remember what Live I installed.

Offline sammyMaX

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 204
  • Rating: +9/-0
    • View Profile
Ubuntu 11.10 32-bit and Luna 0.2b

Are you wondering who Sammy is? My avatar is Sammy.
   

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Do you have the dev packages of them installed?
« Last Edit: December 06, 2011, 06:18:49 pm by jimbauwens »

Offline sammyMaX

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 204
  • Rating: +9/-0
    • View Profile
Yes, I do.

Are you wondering who Sammy is? My avatar is Sammy.