Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
70 user(s) are online (47 user(s) are browsing Forums)

Members: 0
Guests: 70

more...

Headlines

 
  Register To Post  

« 1 2 (3) 4 5 »
Re: Work on Qt 5.8 has begun :)
Home away from home
Home away from home


See User information
@alfkil
dunno if it best, but in e-uae code found this:

https://sourceforge.net/p/euaeppcjit/c ... trunk/src/include/sleep.h

/*
  * UAE - The Un*x Amiga Emulator
  *
  * Wrapper for platform-specific sleep routine
  *
  * Copyright 2003-2005 Richard Drummond
  */

#ifdef __BEOS__
# include <be/kernel/OS.h>
#else
# ifdef TARGET_AMIGAOS
#  include <proto/dos.h>
#  include <clib/alib_protos.h>
# else
#  ifdef USE_SDL
#   include <SDL_timer.h>
#  endif
# endif
#endif

#define ONE_THOUSAND    1000
#define ONE_MILLION    (1000 * 1000)

/* The following would offer no advantage since we always call use_msleep() with
 * a constant and all arithmetic can be done at compile time. */
#if 0
/* This may seem a little odd, but using a nice, round binary factor will speed
 * up the arithmetic for only a 2% error (5% for nanosleep). Our target sleep
 * routines are not tha accurate - and even if they were, we don't need more
 * accuracy.
 */
#define ONE_THOUSAND    1024
#define ONE_MILLION    (1024 * 1024)
#endif

/*
 * void msleep (int ms)
 *
 * Sleep for ms milliseconds using an appropriate system-dependent sleep
 * functions.
 */
#ifdef __BEOS__
# define uae_msleep(msecs) snooze (msecs * ONE_THOUSAND)
#else
# if 0 //defined _WIN32
#  define uae_msleep(msecs) Sleep (msecs)
# else
#  if defined TARGET_AMIGAOS
#   if defined __amigaos4__ || defined __MORPHOS__ 
#    define uae_msleep(msecs) TimeDelay (0, msecs / ONE_THOUSAND, (msecs % ONE_THOUSAND) * ONE_THOUSAND)
#   else
#    define uae_msleep(msecs) Delay (msecs <= 20 ? 1 : msecs/20);
#   endif
#  else
#   ifdef HAVE_NANOSLEEP
#    define uae_msleep(msecs) \
        
\
        
if (msecs 1000) { \
            struct timespec t 
= { 0, (msecs) * ONE_MILLION }; \
            nanosleep 
(&t0); \
        
} else { \
            int secs      
msecs ONE_THOUSAND\
            int millisecs 
msecs ONE_THOUSAND\
            struct timespec t 
= { secsmillisecs ONE_MILLION }; \
            nanosleep 
(&t0); \
        
\
        
}
#   else
#    ifdef HAVE_USLEEP
#     define uae_msleep(msecs) usleep (msecs * ONE_THOUSAND)
#    else
#     ifdef USE_SDL
#      define uae_msleep(msecs) SDL_Delay (msecs)
#     else
#      error "No system sleep function found"
#     endif
#    endif
#   endif
#  endif
# endif
#endif


Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Work on Qt 5.8 has begun :)
Just can't stay away
Just can't stay away


See User information
@kas1e

Super!

It turns out, that ::usleep works just fine, because there are never requests for any time interval less than a microsecond. :)

---

Now: How to emulate mmap and munmap??

Go to top
Re: Work on Qt 5.8 has begun :)
Home away from home
Home away from home


See User information
@alkfil
That probably require some rewriting of code, or at moment just return -1. See here for more info:
http://forum.hyperion-entertainment.b ... hp?f=26&t=3418&hilit=mmap

Will be cool to have some mmap.c which we just can include in all the stuff later, same cool as fork.c :)

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Work on Qt 5.8 has begun :)
Amigans Defender
Amigans Defender


See User information
@alfkil

Quote:

It turns out, that ::usleep works just fine, because there are never requests for any time interval less than a microsecond. :)


Waiting for intervals less than 1 microsecond would need special handling on AmigaOS anyway, as the internal clock works in microseconds you'd need to put something together with the EClock.

Quote:
Now: How to emulate mmap and munmap??


This might be sufficient: https://github.com/chris-y/libgit2/blob/development/src/amiga/map.c

Go to top
Re: Work on Qt 5.8 has begun :)
Just can't stay away
Just can't stay away


See User information
@Chris

Thanks!

Go to top
Re: Work on Qt 5.8 has begun :)
Just can't stay away
Just can't stay away


See User information
What do these mean??!

Resized Image

??

Go to top
Re: Work on Qt 5.8 has begun :)
Home away from home
Home away from home


See User information
@alfkil
It mean that real porting starts now ! :)

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Work on Qt 5.8 has begun :)
Just can't stay away
Just can't stay away


See User information
@kas1e

It was because of .symver. Easy to fix .

http://stackoverflow.com/questions/31 ... node-not-found-for-symbol

Go to top
Re: Work on Qt 5.8 has begun :)
Just can't stay away
Just can't stay away


See User information
There seems to be a problem with GCC 5.3.0. When linking c++ executables with -use-dynld, you will get underfined references - apparently from the fact, that it links agains c libraries and not c++ (it needs to link against libstdc++.so, but fails to do so).

Is there any fix for this??!

Go to top
Re: Work on Qt 5.8 has begun :)
Just can't stay away
Just can't stay away


See User information
@alfkil

Again, a problem with the directory structure of the unofficial GCC 5.3.0 distro.

Files in
Quote:
adtools-os4-20151223-268/lib/gcc/


need to be copied to
Quote:
adtools-os4-20151223-268/lib/gcc/ppc-amigaos/5.3.0/newlib/lib


Thank you!

Go to top
Re: Work on Qt 5.8 has begun :)
Amigans Defender
Amigans Defender


See User information
@alfkil

Make sure you're feeding back these problems to the repo:
https://github.com/sba1/adtools

Go to top
Re: Work on Qt 5.8 has begun :)
Just can't stay away
Just can't stay away


See User information
@Chris

I will. And probably yet more to come.....

Resized Image

So close, and yet so far.... ;-/

Is there perhaps a missing libatomic in the unofficial GCC 5.3.0?

Go to top
Re: Work on Qt 5.8 has begun :)
Just can't stay away
Just can't stay away


See User information
Sorry, probably not a mistake, since why would you support 64 bit atomic operations on a 32 bit platform.....? ;)

---
First app linked to libQt5Core.so.5:

Resized Image

Go to top
Re: Work on Qt 5.8 has begun :)
Not too shy to talk
Not too shy to talk


See User information
Nice to see progress :)

Go to top
Re: Work on Qt 5.8 has begun :)
Home away from home
Home away from home


See User information
@alfkil Quote:
why would you support 64 bit atomic operations on a 32 bit platform.....?

I'm definitely no expert, but it's not uncommon to use 64-bit numbers on a 32-bit platform. So it seems perfectly reasonable (to me) that someone might want atomic 64-bit operations, particularly if the code was ported from a 64-bit platform.

I have no idea if it's possible to support 64-bit atomic operations on our PPC processors, but I don't see why not (it just requires that 64-bit numbers can be written atomically, which a 32-bit CPU might easily support, it the designer's wanted it to).

But maybe I am missing something really obvious. I'm just an arm-chair programmer, as far as atomic stuff is concerned...

Author of the PortablE programming language.
Go to top
Re: Work on Qt 5.8 has begun :)
Just can't stay away
Just can't stay away


See User information
@ChrisH

I think it is 'supposed' to be supported. But it is hard to pin down, where something has been left out. Commenting out the 64 bit atomic functions in Qt makes it at least compile. Other than that, I think that parts of the c++ library has to be ported, before it can be supported on our os. But anyway, I am as much in a wheelchair as you regarding those issues ;).

---
Now, has anyone got a good overview over the different select/waitselect possibilities in newlib/bsdsocket? I remember opting for the bsdsocket/WaitSelect() in the old Qt4 port, but why exactly did I do that? Was it simply to be able to 'select' for AmigaOS signals, or was there perhaps something else involved as well? It could be really cool, if someone could pin out exactly what the differences and drawbacks of each possibility is.

Go to top
Re: Work on Qt 5.8 has begun :)
Amigans Defender
Amigans Defender


See User information
@alfkil

WaitSelect() and waitselect() enable you to wait on AmigaOS signals and socket fds at the same time. If you need to do that, then that's definitely what you should use.

Don't mix bsdsocket.library and newlib calls - either use WaitSelect along with bsdsocket, or waitselect with the newlib equivalent functions (I'd advise to use newlib unless you need any of the more quirky bsdsocket features that newlib doesn't expose)

Go to top
Re: Work on Qt 5.8 has begun :)
Just can't stay away
Just can't stay away


See User information
@Chris

Ah, that was exactly the kind of response, I was looking for. :)

So, for some reason, I chose bsdsocket/WaitSelect in the Qt4 port, but I cannot quite remember the exact reason. I would much rather use waitselect (newlib), so I have got to figure out, what the exact reason was. Any guesses?


Edited by alfkil on 2017/2/9 16:40:08
Go to top
Re: Work on Qt 5.8 has begun :)
Just can't stay away
Just can't stay away


See User information
@thread:

There is an issue with datagrams. It appears, that Qt5 wants to use the cmsghdr structure to get different kinds of info about a package. It uses several macros, that are not defined in newlibs sys/socket.h. For instance

CMSG_SPACE

and

CMSG_LEN

The definition of CMSG_DATA differs rom its Linux counterparts, so I am guessing, that the whole section of definitions are not transferable. The question is: Should I just disable this part of the code, or is there any sence in trying to recover some of its functionalities while abandoning others? I am not too well informed about sockets, so any advise is going to be helpful.
---
BTW in that part of the includes (sys/socket.h), there is a reference to a macro 'ALIGN()' that does not exist in any of the SDK includes.


Edited by alfkil on 2017/2/9 21:53:52
Go to top
Re: Work on Qt 5.8 has begun :)
Just popping in
Just popping in


See User information
Just curious, with making a newer version of QT work on Amiga OS NG systems, what if any newer QT based apps will be expected to work for us?

Is there a newer better QT based Web Browser as an example? One that can offer us a better web experience? Say play youtube html videos within the browser at normal speeds?

Scribus DTP app? That is QT based. I see they have a Haiku version too.

Stuff like that I wonder?

TJ


Edited by AmigaSociety on 2017/2/10 6:21:18
AmigaOne Tabor
AmigaOne X5000
Go to top

  Register To Post
« 1 2 (3) 4 5 »

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project