Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Dariusz Piatkowski

Pages: 1 ... 62 63 [64] 65 66 ... 88
946
Programming / ON-LINE REFERENCES
« on: April 10, 2018, 03:47:02 pm »
This is an on-going listing of various on-line references on the subject of using the pthread (multi-threading) library in GCC.

1) https://computing.llnl.gov/tutorials/pthreads/

'POSIX Threads Programming', superbly written and in-depth review of the pthread library, with examples and detailed walk-throughs.

2) http://www.includehelp.com/c-programming-questions/compiling-program-with-pthread-library-linux.aspx

'Compiling C program with pthread.h library in Linux', good example of a very simple use of the pthread library, includes the walk-through of the necessary GCC flags needed to include the pthread library during the linking stage.

947
Programming / GCC - using pthread library
« on: April 10, 2018, 03:36:47 pm »
I figured that as I'm experimenting with GCC and the multi-threading models I might as well use this space to accumulate the references to various on-line materials and my experiences as I plug-away through this.

OK, so this is just an intro post, my next one will be a continually updated ON-LINE REFERENCES post. If anyone has better ideas for aggregating this (I already excluded private blog since I wanted to expose as much of this info as possible in a central/public location, and this forum seemed like the best place to do so).

948
Those are weird errors which I've never gotten while using GCC+wl.exe. and looks like you're using OW rather then GCC. I didn't even have OW installed on ArcaOS until the other day and linking has been working fine here...

Well, I did eventually find the problem. My installation of OpenWatcom, with all of it's entries in the CONFIG.SYS is what was causing the issue. Funny, sort of similar to what I had ran into installing YUM/RPM and the fact that I had Python 3.x on my machine already. Anyways, taking all the watcom stuff out now allows the RPM versions to execute successfully.

...For now I'd suggest just using ilink 5.0 by setting your environmental variables to empty, which IIRC has better support for using slashes as the directory separator then the earlier ilinks...

Hmm...I have a ZIP version of the ilink 5.0 package, but I did not actually deploy it, is it necessary to do so? The currently installed IBMCPP version is 3.0:

Code: [Select]
[G:\CODE\TOOLS\IBMCPP]ilink

IBM(R) Linker for OS/2(R), Version 03.06.PPK1010917.011116ilink
Copyright (C) IBM Corporation 1988, 1998.
Copyright (C) Microsoft Corp. 1988, 1989.
All rights reserved.

ILink : fatal error LNK1020: no object modules specified

949
Hey Dave!

...Libraries by default are searched for in @UNIXROOT/usr/lib. You can extend the search by using the full path, the -L compiler option (-Lx:/foo/lib) or the %LIBRARY_PATH% environment variable.
Libraries themselves are added to the command line with the -l (small L) parameter, so for pthreads, -lpthread is what you need to add to your compiler command line.
GCC will look for, (default, other flags can change the search order)
1. libfoo_dll.a
2. foo_dll.a
3. libfoo.a
4. foo.a
5. libfoo_s.a
6. foo_s.a
With .lib suffix instead of .a if using -Zomf. Dropping the lib prefix is an OS/2 thing for better 8.3 name compatibility and is usually dropped in the lib line on all platforms, so is usually -lfoo but could be -lx:/path/to/libfoo.a
The _dll.a is a shared import library and _s.a is a static library and without either _s or _dll, could be either. You can use emxomf.exe to convert a .a to .lib library (happens automatically with -Zomf LDFLAG).
The -l and -L are LDFLAGS along with any other that are meant to be passed to the linker...

Alright...so I left the above part of your post as a lead-in to my next topic, in the meantime however let me start off with something much more basic: how the heck do I get the "officially supported" watcom linker system to work?

So here in short is what I have done so far:

1) installed GCC 4.9.2, that seemed to work OK, I was able to compile code and created an EXE out of it, but that was for really simple stuff, basically your typical "hello world"

2) given that I wanted to do the multi-threading benchmarking stuff next I proceeded to deploy the pthread library but that is where I ran into issues at link time, the library functions were not being recognized

OK, so here you provided some great suggestions, I went back to the docs, read it all, multiple times, including on-line research to the EMX/GCC/Watcom specific stuff.

3) I further deployed the various RPM packages which, by the sounds of it, are deemed to be required to successfully build most of the Unix type stuff on our platform, such as the gcc-wrc, gcc-wlink, watcom-wlink-hll, watcom-wrc2. This now gave me the required wl.exe & wrc.exe in \usr\bin and added the following ot my CONFIG.SYS (which I was already experimenting with to learn about these, so I understand why they are being placed there, no problem there):

SET EMXOMFLD_LINKER=wl.exe
SET EMXOMFLD_TYPE=WLINK
SET EMXOMFLD_RC=wrc.exe
SET EMXOMFLD_RC_TYPE=WRC

I am fine with the Watcom approach here, even though the EMXOMFLD stuff could be configured to use IBMCPP 3.0.8 or 3.6.5, or even the default OS/2 Toolkit stuff. I figured the RPM packages support the Watcom way, so I shall proceed down that path first.

Alright...so what's wrong now?

Well, the simplest compile now fails with the following out of the watcom linker:

Code: [Select]
** EXPERIMENTAL (HLL) ** Open Watcom Linker Version 2.0beta1 Limited Availability
Portions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
Warning! W1115: file wlink.lnk: line(16): environment name watcom not found
Error! E2093: file wlink.lnk: line(16): cannot open \binw\wlsystem.lnk

...and I'm thinking: OK, what was the point of doing the RPM package installs, getting the experimental versions of wl & wrc on my system if it still appears like I actually need to configure the normal Watcom stuff in the first place?

Heck, I already have Watcom 1.9 installed on my machine, the complete environment, why wouldn't it simply make more sense to use that instead of GCC??? Or IBMCPP 3.6.5 for that case? OK, maybe the answer lies in the IBM stuff being old and un-supported, but the whole process of just trying to get a working GCC environment seems so convoluted that it easily discourages one to pursue it further, and heck, I'm a guy that used to write big-data DBMS stuff (PL/SQL, some Unix scripting, etc) for living at some point in time...LOL, sorry, venting, yeah I know...but my God...!!! :'(

So help me out please, what am I missing?

I will go further down the path of configuring the Watcom linker stuff, but based on the reading I have done so far that will cause the linker to pull the Watcom libraries (because the wlink.lnk & wlsystem.lnk files are configured as such) instead of the preferred GCC libraries, such as the pthread stuff that's sitting in \usr\lib, and that just doesn't make sense to me.

950
...And when I tried Virtualbox for OS/2 it complained about missing kernel driver. I haven't found a solution for that either...

Take a look at the virtualbox thread in the forum, it will walk you through all that's needed and the stuff you need to watch out for. In short, you are missing the device driver load in your CONFIG.SYS, for example, on my machine that means I have the following statement:

DEVICE=G:\apps\general\Vbox\VBoxDrv.sys

...so you must load the VBoxDrv.sys on your system as well.

Regarding the bigger write-up...thanks for taking the time. AOS is a great effort and is producing some good results. It has been quite some time on our platform that such a substantial amount of work was being done, so as with all projects of that complexity it will take time and will eventually produce a good result. I think it's a given that hardware support and device driver issues will be there forever, such is the plight of us OS/2 folks!

951
Applications / Re: VirtualBox problems
« on: April 07, 2018, 03:55:53 pm »
Hey Doug,

...That sounds like you have a bad copy. Can you mount the ISO in ISOFS?...

Yup..you were right...thank you for pointing out the sometimes obvious culprit...I previously d/l'ed from Oracle VBox site, but as it turned out it was only a partial d/l...a new pull got me a working package.

952
Applications / Re: VirtualBox problems
« on: April 07, 2018, 05:46:43 am »
VBoxGuestAdditions_5.0.6.iso must be renamed to VBoxGuestAdditions.iso, when it is placed in the BIN directory, to be recognized as the default additions ISO. You can open VBoxGuestAdditions_5.0.6.iso in the usual way though.

Hmm...so here is a weird one...I have the ISO in the directory where the EXEs are (using the 5.0.6_OSE_r143 release). Attempting to mount the ISO through Mark's method fails, as does 'Devices=>Insert Guest Additions CD Image', that produces the following error:

=== START ===
Failed to open the disk image file G:\APPS\GENERAL\VBOX/VBoxGuestAdditions.iso.

Could not get the storage format of the medium 'G:\APPS\GENERAL\VBOX/VBoxGuestAdditions.iso' (VERR_NOT_SUPPORTED).

Result Code: VBOX_E_IPRT_ERROR (0x80BB0005)
Component: MediumWrap
Interface: IMedium {4afe423b-43e0-e9d0-82e8-ceb307940dda}
Callee: IVirtualBox {0169423f-46b4-cde9-91af-1e9d5b6cd945}
Callee RC: VBOX_E_OBJECT_NOT_FOUND (0x80BB0001)
=== END ===

Any ideas?

953
Applications / Re: VirtualBox problems
« on: April 04, 2018, 10:27:27 pm »
Mark,

...You might want to try the above Dariusz or others and see if the same workaround works for you...

Actually, my configuration is working fine once I realized I was running the wrong version of VBox for the driver I was loading in CONFIG.SYS.

Your challenge looks like lack of shared memory. Run that shmemmon utility and watch it to see what's available, I'm guessing you will be able to co-related your ability to successfully run VBox with the times your system is showing sufficient shared memory available.

954
Applications / Re: VirtualBox problems
« on: April 04, 2018, 10:23:22 pm »
Dave,
What file system do you use on the other hard drive for the disk images?

...HPFS386...

955
Applications / Re: VirtualBox problems
« on: April 04, 2018, 10:22:40 pm »
Mark,

I use a handly little utility called 'shmemmon' to show me the size of available shared memory. I took a quick look on Hobbes for this, but did not find it. I've attached to the post for your use, or if you reluctant to run this search for the shmemmon.zip out there.

956
Hi David,

One of the things that has seemed to help me is that I lowered the default cached size from 350 MB to 100 MB.  It doesn't seem to bog down (slow down) as much after the change. 

Does ArcaOS with the mutiprocessor kernal still have that single input que (correct me with I have stated it wrong)?  In the past, this was attributed to a large amount of the lockups.

I am using HPFS386 here with a 64MB cache, what IFS are you using?

Re: SIQ, yes, that is the standard model on the OS/2 platform and re-working this, say along the lines of what MS put into NT for example, would require a significant effort that I believe can not be accomplished without having the source code available.

957
Applications / Re: VirtualBox problems
« on: April 03, 2018, 04:46:34 am »
Hi Mark!

...I will try what you suggested above. After migrating to libcx 0.6.2-1 I have not had a successful start of either VM, but that may be because of the current configuration...

The key here is to include the 'SET LIBCX_HIGHMEM=2' in either your CONFIG.SYS or in the vbox.cmd file (like the one I attached to my previous post) which you use to start virtualbox with. That will allow you to run vbox with the new experimental libcx. If you do not have the variable set it is a known fact that virtualbox will not run, at least that's with the standard OS2 or AOS kernels, the result may be different with OS4 kernels.

...I was curious about one other thing.

Is VirtualBox and your VM's installed on the same partition?...

Here is the configuration I have:

1) 'G:\' is my boot drive
2) VBox is installed on G:\
3) virtual machine definitions are stored on G:\, but in a different directly as defined by 'SET VBOX_USER_HOME=G:\HOME\VirtualBox'
4) the VM disk images are stored on another HD (and another parittion), idea there being to avoid disk contention if the main boot drive is being accessed by the program while at the same time the vm is trying to access it's virtual disk (basically a poor man's HD load-balancing if you will, same idea as yours)

I will give the version Valery is talking about a try next as that appears to be a slightly upgraded (newer) version, so if I'm going to experiment why not work with the one that is being actively worked on?

958
Internet / Firefox crash recovery fails to re-populate some tabs???
« on: April 02, 2018, 04:16:31 am »
OK, weird situation here, only because rarely, if ever, has this actually failed in the past. A couple of days ago I had a hard lock on my machine, only power off/on worked...subsequently if I kill Firefox (which I usually do if the sessions start running slow or I need to re-boot for some reason and I do not feel like properly shutting it downly only to have to re-start each tab afterwards, etc, etc) I now have firefox populating the tabs on the 1st and last browser window instantiations only...any browser windows in-between get tabs on them, but the tabs remain BLANK!

Sooo....my re-start no longer works, or to be more correct, only works in a limitted way.

I researched this, went through the clean-up of the session, restore, files...no go, it cleans up fine, but the very next time I happen to have to kill FF and re-start it, the problem comes right back. I even tried out the 'Session Master' add-on, great functionality, but it still did not help, so this leads me to believe the root cause lies somewhere deeper in the FF.

I have not pegged it yet to a certainly number of tabs and/or windows, however, the 1st and last windows always seems to hold true.

....yeah, weird...has anyone seen this before???

BTW: this is with the 45.9 pentium4 release and latest versions of libcx & pthread. I did backlevel them to the standard release, but that had no effect. FF xul.dll is set to standard load, so no highmem for code or data (tried with both scenarios, but that made no difference)....

959
Web applications / Re: Chrome...
« on: April 02, 2018, 04:05:52 am »
Oh yeah, that is great work...awesome functionality to have actually...a pile of stuff I have on the Win7 box that I would love to be able to simply run on my OS/2 desktop.

What do you need from us as far as help & support goes? Is this what the FreeRDP funding request is about?

960
Web applications / PSI IM client problems anyone?
« on: March 31, 2018, 05:58:32 pm »
I've been using the QT PSI IM client for quite some time now. It's pretty stable, works well, some fancy bells here and there, overall, no reason to move to something else.

Alright...so just the other day I was attempting to send my brother a quick msg...however, as soon as I type the 2nd character in the msg window PSI crashes...as in, gone, finito...no popuplog.os2 entry, no trap...nuthin'....ugh?

Has anyone seen this behaviour before?

I can not peg this issue to any changes on my system. The stuff I had most recently done (such as the install of libcx and pthread from the netlabs-exp repo) I actually un-did so I could rule them out. Indeed, going back to the previous versions had no effect on PSI, still crashing.

Before I log a ticket I wanted to check with the forum...I have to believe it is something that has changed on my machine that I am simply overlooking...grrh...pesky pesky....I will keep on digging around but if you've seen this please let me know.

Thanks!

Pages: 1 ... 62 63 [64] 65 66 ... 88