Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot build pkgi - SYS_MUTEX_ATTR_PSHARED not defined #107

Open
ghost opened this issue Jul 14, 2020 · 7 comments
Open

cannot build pkgi - SYS_MUTEX_ATTR_PSHARED not defined #107

ghost opened this issue Jul 14, 2020 · 7 comments

Comments

@ghost
Copy link

ghost commented Jul 14, 2020

@shagkur You took out SYS_MUTEX_ATTR_PSHARED from mutex.h in your recent libspumars commit which is making https://github.com/bucanero/pkgi-ps3 fail to build :

/home/mohasi/pkgi-ps3/source/pkgi_ps3.c: In function 'pkgi_start':
/home/mohasi/pkgi-ps3/source/pkgi_ps3.c:699:31: error: 'SYS_MUTEX_ATTR_PSHARED' undeclared (first use in this function); did you mean 'SYS_MUTEX_ATTR_NOT_PSHARED'?
     mutex_attr.attr_pshared = SYS_MUTEX_ATTR_PSHARED;
                               ^~~~~~~~~~~~~~~~~~~~~~
                               SYS_MUTEX_ATTR_NOT_PSHARED

Will it be put back?

@shagkur
Copy link
Member

shagkur commented Jul 15, 2020

@mohasi I haven't taken it out but renamed, as the compiler already suggests. I'll create a PR for it. But for now, to make sure the rest compiles fine, can you change from SYS_MUTEX_ATTR_PSHARED to SYS_MUTEX_ATTR_NOT_PSHARED on this line?
And report back if any other compile errors happen (tried to compile myself, but there're alot of dependencies to resolve first and i don't want to put too much time into it)

@ghost
Copy link
Author

ghost commented Jul 15, 2020

@shagkur TBH, I gave up, instead I went back to using a pre-compiled older version of the toolchain from @bucanero. The current batch of changes being done in the toolchain pslight & libraries seem like they are going in without proper testing.

To reproduce the error will need to do things in this order:

  1. clone and build the latest ps3toolchain like you always do.
  2. make a symlink ln -s /usr/local/ps3dev/portlibs/ppu/include/freetype2/freetype /usr/local/ps3dev/portlibs/ppu/include/freetype
  3. clone https://github.com/wargio/tiny3D.git & make
  4. clone https://github.com/bucanero/ya2d_ps3 & make & make install
  5. clone https://github.com/bucanero/psl1ght-libs.git go to dbglogger & make
  6. clone https://github.com/bucanero/pkgi-ps3.git & make

The error should present itself. I hope that is enough.

@bucanero
Copy link

yes, from what I see, the only change that affects my code is a rename from:

#define SYS_MUTEX_ATTR_PSHARED			0x0200

to:

#define SYS_MUTEX_ATTR_NOT_PSHARED		0x0200

The value is still the same (0x200), so changing the line should fix it:

mutex_attr.attr_pshared = SYS_MUTEX_ATTR_NOT_PSHARED;

@shagkur
Copy link
Member

shagkur commented Jul 15, 2020

@bucanero Can you give the whole build a try? Currently i'm really busy with other stuff, so i cant/wont test myself as i'd have to gather all the dependencies. But please let me know if there're other compile errors

@bucanero
Copy link

@bucanero Can you give the whole build a try? Currently i'm really busy with other stuff, so i cant/wont test myself as i'd have to gather all the dependencies. But please let me know if there're other compile errors

sure, first I need to checkout the latest upstream changes to PSL1GHT and rebuild my local environment. Then I'll try to rebuild my homebrew apps with the latest version and see how it goes.

When I get the results I'll share my feedback.

@bucanero
Copy link

quick update: yesterday I re-built the whole ps3toolchain+PSL1GHT+ps3libraries without issues, using the latest code available. (as of 2020-07-17)

Now I need to test building my own homebrew apps to see if everything works as expected. I'll update later with more information.

@bucanero
Copy link

pkgi-ps3 built ok, everything works just fine with the latest toolchain+PSL1GHT 😄

only 2 small changes required:

  • the one mentioned above,
mutex_attr.attr_pshared = SYS_MUTEX_ATTR_NOT_PSHARED;
  • on the Makefile, replace -lfont for -lfont3d (Tiny3d libfont was renamed to libfont3d)

This issue can be closed; I'll add these changes to my pkgi-ps3 repository later. 👍

cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants